Created
September 29, 2016 08:40
-
-
Save renra/b853f65761504e88a4e2bbb900282616 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
#! /bin/bash | |
git=/usr/local/bin/git | |
current_branch=`git name-rev --name-only HEAD` | |
if [ -z "$1" ]; then | |
branch=$current_branch | |
else | |
branch=$1 | |
fi | |
if [ $current_branch = $branch ]; then | |
$git checkout master | |
fi | |
$git branch -D $branch | |
$git push origin :$branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment