Skip to content

Commit 65b4464

Browse files
committed
Submodules: update 'git submodule update --remote' behaviour
Since f0a96e8d4c (submodule: fall back to remote's HEAD for missing remote.<name>.branch, 2020-06-24), which went into Git 2.28, 'git submodule upadte --remote' does not default to using the 'master' branch of the remote repository, but rather the remote repository's HEAD branch. Tweak the wording to reflect this behaviour change.
1 parent aabe621 commit 65b4464

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

book/07-git-tools/sections/submodules.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ From https://github.com/chaconinc/DbConnector
262262
Submodule path 'DbConnector': checked out 'd0354fc054692d3906c85c3af05ddce39a1c0644'
263263
----
264264

265-
This command will by default assume that you want to update the checkout to the `master` branch of the submodule repository.
265+
This command will by default assume that you want to update the checkout to the default branch of the remote submodule repository (the one pointed to by `HEAD` on the remote).
266266
You can, however, set this to something different if you want.
267267
For example, if you want to have the DbConnector submodule track that repository's ``stable'' branch, you can set it in either your `.gitmodules` file (so everyone else also tracks it), or just in your local `.git/config` file.
268268
Let's set it in the `.gitmodules` file:

0 commit comments

Comments
 (0)