Documented Usage, Examples, and Installation.

This commit is contained in:
Jason McCreary 2013-10-23 22:55:20 -04:00
parent 897f3b8e14
commit 394a99e0f7

View file

@ -1,4 +1,24 @@
gh
==
# gh
A command-line script to open the GitHub page for a repository.
gh - A command-line script to open the GitHub page for a repository.
## Usage
gh [remote-name] [branch-name]
### Examples
$ gh
> open https://github.com/REMOTE_ORIGIN_USER/CURRENT_REPO/tree/CURRENT_BRANCH
$ gh upstream
> open https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/CURRENT_BRANCH
$ gh upstream master
> open https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/master
## Installation
On Unix systems you have a several options. Namely creating an alias or a symlink to `gh.sh`.
I prefer to create a symlink within `/usr/local/bin/`:
ln -s /Users/jason/Documents/workspace/gh/gh.sh /usr/local/bin/gh
**Note:** `open` my not work across all platforms. On some Linux distributions you can replace `open` to `xdg-open`.