Created
December 4, 2012 01:26
-
-
Save euforic/4199683 to your computer and use it in GitHub Desktop.
Jira Ticket Git Shortcut Command
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
if test "$1" = "finish"; then | |
test -z $2 && echo "ticket <name> number." 1>&2 && exit 1 | |
branch=timob-$2 | |
git checkout master | |
git branch -D $branch && git push origin :$branch | |
else | |
test -z $1 && echo "ticket <name> required." && exit 1 | |
branch=timob-$1 | |
git checkout -b $branch &> /dev/null | |
git checkout $branch &> /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment