Skip to content

Instantly share code, notes, and snippets.

@grafikchaos
Created July 12, 2012 01:44
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 grafikchaos/3095105 to your computer and use it in GitHub Desktop.
Save grafikchaos/3095105 to your computer and use it in GitHub Desktop.
git destroy the remote and local version of the branch
# in your aliases
# (make sure your git-destroy-branch.sh is executable -> chmod +x path/to/your/git-destroy-branch.sh)
alias git-delete-branch='path/to/your/git-destroy-branch.sh'
#!/bin/sh
# git-destroy-branch <branch_name>
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 branch_name
exit 127
fi
git push origin :$1
git branch -d $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment