Skip to content

Instantly share code, notes, and snippets.

@lemenkov
Created November 15, 2020 20:54
Show Gist options
  • Save lemenkov/93c79dd75b74122f885670de9c2854bd to your computer and use it in GitHub Desktop.
Save lemenkov/93c79dd75b74122f885670de9c2854bd to your computer and use it in GitHub Desktop.
Remove unnecessary branches after checkout
for i in `git branch -a |grep remotes/lemenkov | sed -e "s,^\s*remotes/lemenkov/,,g"|grep -v master$` ; do git push lemenkov :${i} ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment