Skip to content

Instantly share code, notes, and snippets.

@dotsara
Last active December 20, 2015 21:19
Show Gist options
  • Save dotsara/6196458 to your computer and use it in GitHub Desktop.
Save dotsara/6196458 to your computer and use it in GitHub Desktop.

Open the branch you're working on in a browser (e.g. for follow-up pull requests, etc.). Got this one from Tom C. during a pairing session. It is awesome.

function open_branch { open http://[github url]/username/`basename \`pwd\``/tree/
$(git symbolic-ref head| sed -e 's/.*\///g'); }

(This lives in my ~/.bash_profile)

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