Skip to content

Instantly share code, notes, and snippets.

@qianyan
Last active August 29, 2015 14:27
Show Gist options
  • Save qianyan/019d6f91b5086b43e272 to your computer and use it in GitHub Desktop.
Save qianyan/019d6f91b5086b43e272 to your computer and use it in GitHub Desktop.
Open chrome to browse your online project when you are under git controlled directory.
# open with chrome
open -a 'Google Chrome' `cat .git/config | awk '/url/{print $3}'`
# open with default browser
open `cat .git/config | awk '/url/{print $3}'`
# alias
alias gon="cat .git/config | awk '/url/{print \$3}' | xargs open"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment