Skip to content

Instantly share code, notes, and snippets.

@timabell
Last active July 16, 2016 07:54
Show Gist options
  • Save timabell/0b85638ce706e5359ea77904a56620e1 to your computer and use it in GitHub Desktop.
Save timabell/0b85638ce706e5359ea77904a56620e1 to your computer and use it in GitHub Desktop.
delete all but the specified branches on the remote, useful after a github fork of a repo with many branches you don't care about
git branch -r |grep timabell| egrep -v "master|gh-pages|things|to|leave"| sed 's/.*\// :/'|xargs git push timabell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment