Skip to content

Instantly share code, notes, and snippets.

@srusskih
Created August 11, 2014 10:30
Show Gist options
  • Save srusskih/f10a4b3edde725ec0208 to your computer and use it in GitHub Desktop.
Save srusskih/f10a4b3edde725ec0208 to your computer and use it in GitHub Desktop.
remove all merged branches
git branch -r --merged | sed -e s/origin\\/// | while read branch; do git push origin :${branch}; git branch -dr origin/${branch}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment