mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
49 lines
1.2 KiB
Markdown
49 lines
1.2 KiB
Markdown
# git-open
|
|
|
|
A command-line script to open the GitHub page, or website for a repository.
|
|
|
|
## Usage
|
|
git open [remote-name] [branch-name]
|
|
|
|

|
|
|
|
### Examples
|
|
$ git open
|
|
> open https://github.com/REMOTE_ORIGIN_USER/CURRENT_REPO/tree/CURRENT_BRANCH
|
|
|
|
$ git open upstream
|
|
> open https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/CURRENT_BRANCH
|
|
|
|
$ git open upstream master
|
|
> open https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/master
|
|
|
|
|
|
## Installation
|
|
|
|
Put the bash script in `~/bin/` and make sure that folder's in your PATH.
|
|
|
|
```sh
|
|
curl -o ~/bin/git-open https://raw.githubusercontent.com/paulirish/git-open/master/git-open
|
|
chmod +x ~/bin/git-open
|
|
```
|
|
|
|
|
|
## Gitlab support
|
|
To configure gitlab support you need to set gitopen.gitlab.domain:
|
|
|
|
```
|
|
git config --global gitopen.gitlab.domain [yourdomain.here]
|
|
# or
|
|
git config gitopen.gitlab.domain [yourdomain.here] # in your local repository
|
|
```
|
|
|
|
|
|
## Thx
|
|
@jasonmccreary did [all the hard work](https://github.com/jasonmccreary/gh)
|
|
|
|
## License
|
|
|
|
Copyright Jason McCreary & Paul Irish. Licensed under MIT.
|
|
|
|
http://opensource.org/licenses/MIT
|