This is a convenience script to open the repo corresponding to a Git remote URL in your default browser.
From anywhere in a Git repo:
$ git remote -v | grep push origin firstname.lastname@example.org:kevinburke/gitopen.git (push) $ ./gitopen origin
https://github.com/kevinburke/gitopen in your browser. If you do
this hundreds of times a week, this is a pretty useful hack.
Open a pull request
To open a pull request from the command line, run:
$ gitopen -p
This will open a pull request for the current branch to be pulled from the
origin remote into master.
Open a pull request against a different remote
To open a pull request against a different remote (say, the
specify the remote name after the
$ gitopen -p upstream
This will open a pull request for the current branch to be pulled into the upstream master.
Open the tip of a branch
--tip to open the tip:
It works with branches as well:
gitopen --tip --branch develop
Will open the most recent commit on the
View all current pull requests
To open the view with all current pull requests for the repo, use the
$ gitopen --pulls
- Clone this repository:
git clone git://github.com/kevinburke/gitopen.git
- Place the
gitopenexecutable somewhere on your PATH, possibly like this:
ln -s $PWD/gitopen /usr/local/bin
- Works with URL's behind the firewall (eg private installs)
- Works with SSH and git-read-only URL's
- open pull requests against the upstream by default (if it exists)