Skip to content

Instantly share code, notes, and snippets.

@aheckmann
Created September 9, 2011 22:55
Show Gist options
  • Save aheckmann/1207539 to your computer and use it in GitHub Desktop.
Save aheckmann/1207539 to your computer and use it in GitHub Desktop.
alias github='__git_branch_=$(git symbolic-ref -q HEAD);__git_branch_=${__git_branch_/#refs\/heads/};__git_repo_=$(git config --get remote.origin.url);__git_repo_=$ {__git_repo_/[email protected]:/};__git_repo_=${__git_repo_/%.git/};open "https://github.com/$__git_repo_/tree$__git_branch_";'
@aheckmann
Copy link
Author

I suck at bash but it works.

@aheckmann
Copy link
Author

opens the current repo on github

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