-
-
Save l15n/7112231 to your computer and use it in GitHub Desktop.
Delete all remote branches on your fork `mine` which have already been merged into upstream `origin/master`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch --merged master | | |
grep -v '*' | | |
grep -v master | | |
xargs -L1 | | |
xargs git branch -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch -r --merged origin/master | | |
grep mine | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
xargs git branch -r -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git branch -r --merged origin/master | | |
grep mine | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push mine --delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment