Skip to content

Commit d73e616

Browse files
committed
Merge branch 'jl/doc-submodule-update-checkout'
Add missing documentation for "submodule update --checkout". * jl/doc-submodule-update-checkout: submodule update: consistently document the '--checkout' option
2 parents 2b66d31 + 893a976 commit d73e616

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Documentation/git-submodule.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SYNOPSIS
1515
'git submodule' [--quiet] init [--] [<path>...]
1616
'git submodule' [--quiet] deinit [-f|--force] [--] <path>...
1717
'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch]
18-
[-f|--force] [--rebase|--merge|--checkout] [--reference <repository>]
18+
[-f|--force] [--checkout|--rebase|--merge] [--reference <repository>]
1919
[--depth <depth>] [--recursive] [--] [<path>...]
2020
'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
2121
[commit] [--] [<path>...]
@@ -315,6 +315,15 @@ the submodule itself.
315315
This option is only valid for the update command.
316316
Don't fetch new objects from the remote site.
317317

318+
--checkout::
319+
This option is only valid for the update command.
320+
Checkout the commit recorded in the superproject on a detached HEAD
321+
in the submodule. This is the default behavior, the main use of
322+
this option is to override `submodule.$name.update` when set to
323+
`merge`, `rebase` or `none`.
324+
If the key `submodule.$name.update` is either not explicitly set or
325+
set to `checkout`, this option is implicit.
326+
318327
--merge::
319328
This option is only valid for the update command.
320329
Merge the commit recorded in the superproject into the current branch

git-submodule.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <re
99
or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]
1010
or: $dashless [--quiet] init [--] [<path>...]
1111
or: $dashless [--quiet] deinit [-f|--force] [--] <path>...
12-
or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
12+
or: $dashless [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--reference <repository>] [--recursive] [--] [<path>...]
1313
or: $dashless [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
1414
or: $dashless [--quiet] foreach [--recursive] <command>
1515
or: $dashless [--quiet] sync [--recursive] [--] [<path>...]"

0 commit comments

Comments
 (0)