Skip to content

Instantly share code, notes, and snippets.

@paularmstrong
Created July 28, 2016 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paularmstrong/50bd44dbf979f9683d58095b041b8a1e to your computer and use it in GitHub Desktop.
Save paularmstrong/50bd44dbf979f9683d58095b041b8a1e to your computer and use it in GitHub Desktop.
Because sometimes everything you wrote was bad.
# Completely remove the current branch from a git repo
function rm-branch() {
branch="$(git branch --no-color | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')"
git checkout master
git branch -D $branch
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment