Created
April 9, 2013 22:02
-
-
Save bjorg/5349811 to your computer and use it in GitHub Desktop.
Script to delete all local branches that have been merged into the local master branch. Useful to run after update local master and removing old branches that have already been merged. **IMPORTANT:** make sure to switch to 'master' before you run this command.
This file contains hidden or 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
| #!/bin/sh | |
| git branch --merged master | grep -v "\*" | xargs -n 1 git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment