Skip to content

Commit

Permalink
readme: refactor Configuration section (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Dec 1, 2017
1 parent b526edc commit cdfb1cb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ git-open can automatically guess the corresponding repository page for remotes
- Visual Studio Team Services
- Team Foundation Server (on-premises)
### Configuration (GitLab support)
## Configuration
### Configuring the web destination (aka GitLab support)
To configure GitLab support (or other unique hosting situations) you need to set some options.
Expand All @@ -127,16 +129,20 @@ git config [--global] "open.https://git.internal.biz.domain" "repo.intranet/subp
git config [--global] "open.https://git.internal.biz.protocol" "http"
```
### Default remote
### Configuring which remote to open
By default, `git open` opens the remote named `origin`. However, if your current branch is [remotely-tracking](https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#_tracking_branches) a different remote, that tracked remote will be used.
Normally `git open` opens the remote named `origin`. When you fork a project
In some instances, you may want to override this behavior. When you fork a project
and add a remote named `upstream` you often want that upstream to be opened
as the default remote. To accomplice this, you can do this:
rather than your fork. To accomplish this, you can set the `open.default.remote` within your project:
```sh
git config open.default.remote upstream
```
This is equivalent to always typing `git open upstream`.
## Alternative projects
See [hub](https://github.com/github/hub) for complete GitHub opening support.
Expand Down

0 comments on commit cdfb1cb

Please sign in to comment.