Skip to content

Commit 7a4bb55

Browse files
Denton-Lgitster
authored andcommitted
git-submodule.txt: "--branch <branch>" option defaults to 'master'
This behavior is mentioned in gitmodules.txt but not in git-submodule.txt so we copy the information over so that it is not missed. Also, add the missed argument to the -b/--branch option. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d62dad7 commit 7a4bb55

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Documentation/git-submodule.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,14 @@ OPTIONS
255255
This option is only valid for the deinit command. Unregister all
256256
submodules in the working tree.
257257

258-
-b::
259-
--branch::
258+
-b <branch>::
259+
--branch <branch>::
260260
Branch of repository to add as submodule.
261261
The name of the branch is recorded as `submodule.<name>.branch` in
262262
`.gitmodules` for `update --remote`. A special value of `.` is used to
263263
indicate that the name of the branch in the submodule should be the
264-
same name as the current branch in the current repository.
264+
same name as the current branch in the current repository. If the
265+
option is not specified, it defaults to 'master'.
265266

266267
-f::
267268
--force::

0 commit comments

Comments
 (0)