Skip to content

Instantly share code, notes, and snippets.

@csharpfritz
Last active September 6, 2018 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csharpfritz/70ef60ba47dfce1b77053a1b96cd132c to your computer and use it in GitHub Desktop.
Save csharpfritz/70ef60ba47dfce1b77053a1b96cd132c to your computer and use it in GitHub Desktop.
Git tips and tricks
# 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