- Delete all local branches that track remote
origin
except -master
,dev
anddemo
git branch -r | grep origin | grep -v origin/HEAD | grep -v "origin/dev$" | grep -v "origin/master$" | grep -v "origin/demo$" | xargs -n 1 git branch -rd
Last active
July 5, 2018 14:11
-
-
Save igodorogea/ce0463152c17a917ef8a0594cb1e9a52 to your computer and use it in GitHub Desktop.
Remove all your local git branches except ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment