Skip to content

Instantly share code, notes, and snippets.

@PharaohKJ
Created February 4, 2015 03:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PharaohKJ/d62c9ecc48d55a86d020 to your computer and use it in GitHub Desktop.
Save PharaohKJ/d62c9ecc48d55a86d020 to your computer and use it in GitHub Desktop.
osxでconsoleにいてworking directoryのgithub上のmasterブランチを開く
open `git remote -v|grep origin|grep git@github|head -n1|sed -e 's#origin.*git@\(.*\)\:\(.*\).git.*#https:\/\/\1\/\2\/#'`tree/master/$(pwd |sed -e "s|`git rev-parse --show-toplevel`/||")
@PharaohKJ
Copy link
Author

aliasならこれ

alias gopen='open `git remote -v|grep origin|grep git@github|head -n1|sed -e "s#origin.*git@\(.*\)\:\(.*\).git.*#https:\/\/\1\/\2\/#"`tree/master/$(pwd |sed -e "s|`git rev-parse --show-toplevel`/||")'

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