Gitopen
This is a convenience script to open the repo corresponding to a Git remote URL in your default browser.
Usage
From anywhere in a Git repo:
$ git remote -v | grep push
origin git@github.com:kevinburke/gitopen.git (push)
$ ./gitopen originWill open 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 -pThis 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 upstream remote),
specify the remote name after the -p flag:
$ gitopen -p upstreamThis will open a pull request for the current branch to be pulled into the upstream master.
Open the tip of a branch
Use --tip to open the tip:
gitopen --tipIt works with branches as well:
gitopen --tip --branch developWill open the most recent commit on the develop branch.
View all current pull requests
To open the view with all current pull requests for the repo, use the -s or
--pulls flag:
$ gitopen --pullsInstallation
- 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/binFeatures
- Works with URL's behind the firewall (eg private installs)
- Works with SSH and git-read-only URL's
Todo
- open pull requests against the upstream by default (if it exists)