Skip to content

Instantly share code, notes, and snippets.

@torunar
Last active May 20, 2016 10:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torunar/787efb8dd06de298e55c to your computer and use it in GitHub Desktop.
Save torunar/787efb8dd06de298e55c to your computer and use it in GitHub Desktop.
git shortands
# remove local branches that are removed on remote
git fetch --all --prune
git branch --merged | grep -v "\*" | grep -Ev "(\*|master|dev|patch|minor)" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment