Last active
February 12, 2018 08:31
-
-
Save hoseinit/01fe3e034d828067a2501edb6fc03cf9 to your computer and use it in GitHub Desktop.
Remove Merged Branches from Local Git
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
// Gitlab projects | |
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d | |
//or on Github projects: | |
git branch --merged | grep -v '*' | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment