cd ~/some-project
ghNow your default browser opens with github.com/path/to/some-project.
- Download
ghscript - Place somewhere in your
$PATHto have it globally accessable
| #!/usr/bin/env ruby | |
| # vim: set ft=ruby | |
| if Dir.exists?(".git") | |
| repo_url = `git config remote.origin.url`.strip | |
| if !repo_url.empty? and repo_url =~ /github\.com[:\/](.*)\.git$/ | |
| `open "https://github.com/#{$1}"` | |
| exit 0 | |
| end | |
| end | |
| exit 1 |