Automatically check out a git branch corresponding to the name of a given JIRA ticket.
If you have access to Nulogy's private homebrew tap, you can install branj directly through Homebrew:
$ brew tap nulogy/homebrew-nulogy git@github.com:nulogy/homebrew-nulogy.git
$ brew install nulogy/nulogy/branjYou can also install branj manually by running the following steps
Symlink branj into any folder on your PATH.
For example:
$ mkdir ~/bin
$ echo 'export PATH=~/bin:$PATH' >> ~/.zshrc
$ ln -s "$(pwd)/branj" ~/bin/branj$ branj <jira-ticket-number> [<base-branch>]A wizard will walk you through configuration of the script the first time it is executed.
-s: Add a suffix to the created branch. Example:$ branj -s part-two FOO-1337 Switched to a new branch 'FOO-1337-fix-broken-things-part-two'-m: Rename the current branch instead of creating a new one. Example:$ branj -m FOO-1337
-n: Output the branch name only, without checking out or creating a branch. Example:$ branj -n FOO-1337 FOO-1337-fix-broken-things
$ cd ~/src/foo_project
$ branj FOO-1337
Switched to a new branch 'FOO-1337-fix-broken-things'