Skip to content

Instantly share code, notes, and snippets.

@euforic
Created December 4, 2012 01:26
Show Gist options
  • Save euforic/4199683 to your computer and use it in GitHub Desktop.
Save euforic/4199683 to your computer and use it in GitHub Desktop.
Jira Ticket Git Shortcut Command
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