Skip to content

Commit

Permalink
Fix git rm merged
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 25, 2021
1 parent 92f39b9 commit 8d24aa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cookbook/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Nu can help with common `Git` tasks like removing all local branches which have
Warning: This command will hard delete the merged branches from your machine.
You may want to check the branches selected for deletion by omitting the last git command.

`git branch --merged | lines | where $it != "* master" | git branch -D $it`
`git branch --merged | lines | where ($it != "* master" && $it != "* main") | each { git branch -D ($it | str trim) }`

Output

Expand Down

0 comments on commit 8d24aa2

Please sign in to comment.