Skip to content

Instantly share code, notes, and snippets.

@choiceforyou
Created July 24, 2015 04:40
Show Gist options
  • Save choiceforyou/ffd7e9ea5016ccd78e01 to your computer and use it in GitHub Desktop.
Save choiceforyou/ffd7e9ea5016ccd78e01 to your computer and use it in GitHub Desktop.
Commands in one line to cleanup branches in git folder

git checkout master && git pull && git branch --merged master | 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