Last active
September 6, 2018 14:53
-
-
Save csharpfritz/70ef60ba47dfce1b77053a1b96cd132c to your computer and use it in GitHub Desktop.
Git tips and tricks
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
# Delete extra branches that are NOT dev or master | |
git for-each-ref --format '%(refname:short)' refs/heads --merged | ForEach-Object { If("dev","master" -notcont ains $_) { git branch $_ -d } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment