Skip to content

Instantly share code, notes, and snippets.

@kflorence
Created February 20, 2014 01:25
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 kflorence/9105161 to your computer and use it in GitHub Desktop.
Save kflorence/9105161 to your computer and use it in GitHub Desktop.
Git alias for removing stale branches that have already been merged into master
[alias]
tidy = !git branch --merged master | grep -v 'master$' | xargs git branch -d && git remote | xargs -n 1 git remote prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment