Skip to content

Commit

Permalink
Update post: Git Tips
Browse files Browse the repository at this point in the history
  • Loading branch information
khuongln-1346 authored Jul 15, 2024
1 parent b057362 commit 1216114
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _posts/2022-04-14-git-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ __Alternatives:__
git branch --merged master | grep -v '^\*\| master' | xargs -n 1 git branch -d # will not delete master if master is not checked out
```

### Delete all local branches except for main, develop

```sh
git branch | grep -v " main$" | grep -v " develop$" | xargs git branch -D
```

### List all branches and their upstreams, as well as last commit on branch

```sh
Expand Down

0 comments on commit 1216114

Please sign in to comment.