forked from mirrors/jj
docs: document git.fetch
and git.push
config options
Someone on Discord asked this exact question, but these options apparently weren't documented when they were added in the `0.7.0` release. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
6c1aeff7a9
commit
015c52bcdc
2 changed files with 28 additions and 1 deletions
|
@ -514,6 +514,29 @@ conflict is considered fully resolved when there are no conflict markers left.
|
||||||
|
|
||||||
## Git settings
|
## Git settings
|
||||||
|
|
||||||
|
### Default remotes for `jj git fetch` and `jj git push`
|
||||||
|
|
||||||
|
By default, if a single remote exists it is used for `jj git fetch` and `jj git
|
||||||
|
push`; however if multiple remotes exist, the default remote is assumed to be
|
||||||
|
named `"origin"`, just like in Git. Sometimes this is undesirable, e.g. when you
|
||||||
|
want to fetch from a different remote than you push to, such as a GitHub fork.
|
||||||
|
|
||||||
|
To change this behavior, you can modify the [repository
|
||||||
|
configuration](#config-files-and-toml) variable `git.fetch`, which can be a
|
||||||
|
single remote, or a list of remotes to fetch from multiple places:
|
||||||
|
|
||||||
|
```
|
||||||
|
jj config set --repo git.fetch "upstream"
|
||||||
|
jj config set --repo git.fetch '["origin", "upstream"]'
|
||||||
|
```
|
||||||
|
|
||||||
|
Similarly, you can also set the variable `git.push` to cause `jj git push` to
|
||||||
|
push to a different remote:
|
||||||
|
|
||||||
|
```
|
||||||
|
jj config set --repo git.push "github"
|
||||||
|
```
|
||||||
|
|
||||||
### Automatic local branch creation
|
### Automatic local branch creation
|
||||||
|
|
||||||
When `jj` imports a new remote-tracking branch from Git, it can also create a
|
When `jj` imports a new remote-tracking branch from Git, it can also create a
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Basic template of config settings
|
# Basic template of config settings
|
||||||
|
|
||||||
# Don't forget to change these to your own details!
|
# Don't forget to change these to your own details!
|
||||||
user.name = "YOUR NAME"
|
user.name = "YOUR NAME"
|
||||||
user.email = "YOUR_EMAIL@example.com"
|
user.email = "YOUR_EMAIL@example.com"
|
||||||
|
|
||||||
ui.color = "auto" # the default
|
ui.color = "auto" # the default
|
||||||
|
@ -27,3 +27,7 @@ template-aliases.'format_timestamp(timestamp)' = 'timestamp.ago()'
|
||||||
# see documentation in config.md. An example:
|
# see documentation in config.md. An example:
|
||||||
|
|
||||||
# merge-tools.meld.program = "C:\\Program Files\\Meld\\meld.exe" # If not in PATH
|
# merge-tools.meld.program = "C:\\Program Files\\Meld\\meld.exe" # If not in PATH
|
||||||
|
|
||||||
|
# Change the default push/fetch remote for `jj git push` and `jj git fetch`
|
||||||
|
# git.fetch = "upstream"
|
||||||
|
# git.push = "myfork"
|
||||||
|
|
Loading…
Reference in a new issue