Skip to content

Instantly share code, notes, and snippets.

@Bhacaz
Last active September 6, 2017 14:51
Show Gist options
  • Save Bhacaz/259b88f38cd1a28101a5f09065e07233 to your computer and use it in GitHub Desktop.
Save Bhacaz/259b88f38cd1a28101a5f09065e07233 to your computer and use it in GitHub Desktop.
I'm working with JIRA and ticket number and to change branch without tapping the board name, the numbre and press TAB a couple of times I create this alias to only write the number.
git config --global alias.chb 'chb = !sh -c "git branch -a | grep $1 | head -n 1 | cut -d/ -f3- | xargs git checkout"'
git chb 1085 # Example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment