Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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