Created
July 12, 2012 01:44
-
-
Save grafikchaos/3095105 to your computer and use it in GitHub Desktop.
git destroy the remote and local version of the branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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