Skip to content

Instantly share code, notes, and snippets.

@jaredhirsch
Created November 14, 2014 21:56
Show Gist options
  • Save jaredhirsch/254bea7817193e396b3e to your computer and use it in GitHub Desktop.
Save jaredhirsch/254bea7817193e396b3e to your computer and use it in GitHub Desktop.
i could tweet this, but i'll put it here randomly instead

I have like, so many old local branches. how to get rid of the ones I don't need any more?

courtesy of [1], the answer is: "delete the ones that have been merged":

git branch --merged | grep -v \* | xargs git branch -D

[1] http://stackoverflow.com/a/10610669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment