Disclaimer: I’m sure this functionality exists elsewhere, but this was a fun little thing for me to work on. Also, you’ll need a minimum of git 2.7 for this to work.
Often, when I’m working locally I like to bounce right over to a GitHub repository url to check something. I ended up writing a bit of code to make this easier. While I was at it, I decided it would be nice to have the same thing for Travis URLs. So, I’ve released this as part of Git::Helpers.
When you’re inside a Git repository, you can use gh-open to open a browser window with the GitHub URL of your repository.
gh-open also accepts an origin name as an argument, so
would open a tab in your default browser containing your upstream’s URL, assuming you have an origin by that name. Don’t specify a remote name and it will assume origin:
It doesn’t currently care which branch you’re on, but patches welcome (in the kindest sense of the expression).
If you want to check your Travis page for the repository then travis-open will do the same kind of thing. It also accepts an origin name, just as
or defaults to origin if you don’t: