Created
April 15, 2019 10:36
-
-
Save jperasmus/75517737060ec7070faeb7f43b073072 to your computer and use it in GitHub Desktop.
A Git terminal command to remove all local branches that have already been merged into main remote branches.
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
git fetch -p && git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment