Skip to content

Instantly share code, notes, and snippets.

@treshugart
Created November 17, 2013 22:16
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 treshugart/7518976 to your computer and use it in GitHub Desktop.
Save treshugart/7518976 to your computer and use it in GitHub Desktop.
Sync and cleanup all local branches that have been merged (except master).
git pull
git remote prune origin
git branch --merged | grep -v "\*" | grep -v "master" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment