1 | | - | gh |
2 | | - | == |
| 1 | + | # gh |
| 2 | + | A command-line script to open the GitHub page for a repository. |
| 3 | + | |
| 4 | + | ## Usage |
| 5 | + | gh [remote-name] [branch-name] |
| 6 | + | |
| 7 | + | ### Examples |
| 8 | + | $ gh |
| 9 | + | > open https://github.com/REMOTE_ORIGIN_USER/CURRENT_REPO/tree/CURRENT_BRANCH |
3 | 10 | | |
4 | | - | gh - A command-line script to open the GitHub page for a repository. |
| 11 | + | $ gh upstream |
| 12 | + | > open https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/CURRENT_BRANCH |
| 13 | + | |
| 14 | + | $ gh upstream master |
| 15 | + | > open https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/master |
| 16 | + | |
| 17 | + | ## Installation |
| 18 | + | On Unix systems you have a several options. Namely creating an alias or a symlink to `gh.sh`. |
| 19 | + | |
| 20 | + | I prefer to create a symlink within `/usr/local/bin/`: |
| 21 | + | |
| 22 | + | ln -s /Users/jason/Documents/workspace/gh/gh.sh /usr/local/bin/gh |
| 23 | + | |
| 24 | + | **Note:** `open` my not work across all platforms. On some Linux distributions you can replace `open` to `xdg-open`. |
5 | 25 | | |