submodule.<name>.path::
submodule.<name>.url::
+ The path within this project and URL for a submodule. These
+ variables are initially populated by 'git submodule init';
+ edit them to override the URL and other values found in the
+ `.gitmodules` file. See linkgit:git-submodule[1] and
+ linkgit:gitmodules[5] for details.
+
submodule.<name>.update::
- The path within this project, URL, and the updating strategy
- for a submodule. These variables are initially populated
- by 'git submodule init'; edit them to override the
- URL and other values found in the `.gitmodules` file. See
- linkgit:git-submodule[1] and linkgit:gitmodules[5] for details.
+ The default updating strategy for a submodule, used by `git
+ submodule update`. This variable is populated by `git
+ submodule init` from linkgit:gitmodules[5].
+
+ If the value is 'checkout' (the default), the new commit
+ specified in the superproject will be checked out in the
+ submodule on a detached HEAD.
+ If 'rebase', the current branch of the submodule will be
+ rebased onto the commit specified in the superproject.
+ If 'merge', the commit specified in the superproject will be
+ merged into the current branch in the submodule. If 'none',
+ the submodule with name `$name` will not be updated by
+ default.
+ If the value is of form '!command', it will cause `command` to
+ be run. `command` can be any arbitrary shell command that
+ takes a single argument, namely the sha1 to update to.
submodule.<name>.branch::
The remote branch name for a submodule, used by `git submodule
it contains local modifications.
update::
- Update the registered submodules, i.e. clone missing submodules and
- checkout the commit specified in the index of the containing repository.
- This will make the submodules HEAD be detached unless `--rebase` or
- `--merge` is specified or the key `submodule.$name.update` is set to
- `rebase`, `merge` or `none`. `none` can be overridden by specifying
- `--checkout`. Setting the key `submodule.$name.update` to `!command`
- will cause `command` to be run. `command` can be any arbitrary shell
- command that takes a single argument, namely the sha1 to update to.
+ Update the registered submodules to match what the superproject
+ expects by cloning missing submodules and updating the working
+ tree of the submodules. The "updating" can take various forms
+ and can be configured in .git/config by the
+ `submodule.$name.update` key or by explicitely giving one of
+ '--checkout' (the default), '--merge' or '--rebase' options. See
+ linkgit:git-config[1] for details.
+
If the submodule is not yet initialized, and you just want to use the
setting as stored in .gitmodules, you can automatically initialize the
Checkout the commit recorded in the superproject on a detached HEAD
in the submodule. This is the default behavior, the main use of
this option is to override `submodule.$name.update` when set to
- `merge`, `rebase` or `none`.
+ other value than `checkout`.
If the key `submodule.$name.update` is either not explicitly set or
set to `checkout`, this option is implicit.
In addition, there are a number of optional keys:
submodule.<name>.update::
- Defines what to do when the submodule is updated by the superproject.
- If 'checkout' (the default), the new commit specified in the
- superproject will be checked out in the submodule on a detached HEAD.
- If 'rebase', the current branch of the submodule will be rebased onto
- the commit specified in the superproject. If 'merge', the commit
- specified in the superproject will be merged into the current branch
- in the submodule.
- If 'none', the submodule with name `$name` will not be updated
- by default.
-
- This config option is overridden if 'git submodule update' is given
- the '--merge', '--rebase' or '--checkout' options.
+ Defines what to do when the submodule is updated by the
+ superproject. This is only used by `git submodule init` to
+ initialize the variable of the same name in .git/config.
+ Allowed values here are 'checkout', 'rebase', 'merge' or
+ 'none'. See linkgit:git-config[1] for their meaning and other
+ values that can be configured manually by users.
submodule.<name>.branch::
A remote branch name for tracking updates in the upstream submodule.