Skip to content

Instantly share code, notes, and snippets.

@thisizkp
Created October 8, 2018 01:05
Show Gist options
  • Save thisizkp/c710784cdd117b46025dadaed8855ac9 to your computer and use it in GitHub Desktop.
Save thisizkp/c710784cdd117b46025dadaed8855ac9 to your computer and use it in GitHub Desktop.
Git commands

Delete all branches except "master" from local

git branch | grep -v "master" | sed 's/^[ *]*//' | sed 's/^/git branch -d /' | bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment