git nested config
Read or write a nested repository’s configuration.
git nested config [<subdir>] # print all fields
git nested config [<subdir>] <key> # print one field
git nested config [<subdir>] <key> <value> # set one field
What it does
config reads and writes the fields of <subdir>/.gitnested. Use it
instead of editing the file by hand.
With no key, it prints every field the file sets, one per line:
<key> <value>.With a key, it prints the value. A field that is not set prints nothing.
With a key and a value, it sets the field and stages the file. It does not commit. Commit it yourself.
Arguments
Argument |
Meaning |
|---|---|
|
the nested repository. Can be left out inside it |
|
the field to read or write |
|
the new value |
Keys
Key |
Meaning |
Writable |
|---|---|---|
|
the upstream repository |
yes |
|
the upstream branch |
yes |
|
how upstream history is joined: |
yes |
|
whether pull makes one parent commit: |
yes |
|
the upstream commit currently nested |
no |
|
the commit the nested history hangs off |
yes |
|
the paths of the upstream repository that are nested |
no |
|
the paths of the upstream repository that are left out |
no |
|
the directory of the upstream repository that is nested, at the root of the subdir |
no |
|
a commit or tag of the branch to nest, instead of its newest commit |
yes |
|
the git-nested version that last wrote this file |
no |
|
|
yes |
The other keys are written by the commands themselves. Setting one by hand would describe a state the repository is not in.
The .gitnested file explains each
key.
Examples
git nested config ext/lib
git nested config ext/lib method
git nested config ext/lib method rebase
git nested config ext/lib readonly true
git commit -m "lib: pull with rebase, never push"
Notes
A relative path as a
remotevalue is taken relative to the folder you are in, like git does. It is stored relative to the top of your repository.An unknown key, or a bad value for
method,squashorreadonly, is refused.