- Save jira-co.rb to a folder on your $PATH (for example ~/bin).
chmod +x jira-co.rb
to make it executable.- Add git alias to your ~/.gitconfig like so:
[alias]
co-jira = !sh -c 'jira-co.rb $1' -
- Switch to your repo's folder and use it!
>> git co-jira ruby-2379
checking out branch: "RUBY-2379_public_pr_316_reduce_allocations_for_options_hashes"
Switched to branch 'RUBY-2379_public_pr_316_reduce_allocations_for_options_hashes'
NOTE: Only checks out an existing remote or local branch. Does not create a new one!