Created
February 12, 2015 14:24
-
-
Save robinsk/523155e8e974fc930919 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
current_branch=$(git symbolic-ref --short -q HEAD) | |
if [ "$current_branch" = "master" ]; then | |
echo "You're on master, are you crazy?" >&2 | |
exit 1 | |
fi | |
git checkout master | |
git pull | |
git remote prune origin | |
git branch -d "$current_branch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment