Update draft release notes to 2.0
[gitweb.git] / Documentation / git-submodule.txt
index 21cb59a6d6d9dd87754e2b20ec47bc67147370c7..77588b0dd8f94a20e1be4b6ab464e898bb336439 100644 (file)
@@ -15,7 +15,7 @@ SYNOPSIS
 'git submodule' [--quiet] init [--] [<path>...]
 'git submodule' [--quiet] deinit [-f|--force] [--] <path>...
 'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch]
-             [-f|--force] [--rebase|--merge|--checkout] [--reference <repository>]
+             [-f|--force] [--checkout|--rebase|--merge] [--reference <repository>]
              [--depth <depth>] [--recursive] [--] [<path>...]
 'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
              [commit] [--] [<path>...]
@@ -162,7 +162,7 @@ update::
 +
 For updates that clone missing submodules, checkout-mode updates will
 create submodules with detached HEADs; all other modes will create
-submodules with a local branch named after `submodule.<path>.branch`.
+submodules with a local branch named after `submodule.<name>.branch`.
 +
 For updates that do not clone missing submodules, the submodule's HEAD
 is only touched when the remote reference does not match the
@@ -247,7 +247,7 @@ OPTIONS
 -b::
 --branch::
        Branch of repository to add as submodule.
-       The name of the branch is recorded as `submodule.<path>.branch` in
+       The name of the branch is recorded as `submodule.<name>.branch` in
        `.gitmodules` for `update --remote`.
 
 -f::
@@ -315,6 +315,15 @@ the submodule itself.
        This option is only valid for the update command.
        Don't fetch new objects from the remote site.
 
+--checkout::
+       This option is only valid for the update command.
+       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`.
+       If the key `submodule.$name.update` is either not explicitly set or
+       set to `checkout`, this option is implicit.
+
 --merge::
        This option is only valid for the update command.
        Merge the commit recorded in the superproject into the current branch