Created
May 3, 2016 17:57
-
-
Save marc-hughes/c66f68fbbac9ca61e74644f5751c5df7 to your computer and use it in GitHub Desktop.
Git Alias to clean merged feature branches
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
# Put this into .gitignore: | |
[alias] | |
cleanfeature = branch --merged | grep "feature/" | xargs -n 1 git branch -d | |
# Then, run git cleanfeature - it will delete every branch with name containing feature/ that has been fully merged into the current branch. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment