Skip to content

Instantly share code, notes, and snippets.

@steve-ross
Created February 25, 2016 16:18
Show Gist options
  • Save steve-ross/047bd69a912a9ad3da73 to your computer and use it in GitHub Desktop.
Save steve-ross/047bd69a912a9ad3da73 to your computer and use it in GitHub Desktop.
if you name your github branches ending in #123 this will open the issue on github (using hub)
function _git_branch_issue_number
echo (git symbolic-ref HEAD ^/dev/null | sed -e 's/.*#//')
end
function git-issue
set -l issue_number (_git_branch_issue_number)
git browse -- issues/$issue_number
end
@steve-ross
Copy link
Author

Install hub first and alias it to 'git'
brew install hub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment