Skip to content

Commit 9937e65

Browse files
wkinggitster
authored andcommitted
Documentation: describe 'submodule update --remote' use case
Make it clear that there is no implicit floating going on; --remote lets you explicitly integrate the upstream branch in your current HEAD (just like running 'git pull' in the submodule). The only distinction with the current 'git pull' is the config location and setting used for the upstream branch, which is hopefully clear now. Signed-off-by: W. Trevor King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 23d25e4 commit 9937e65

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Documentation/git-submodule.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,16 @@ In order to ensure a current tracking branch state, `update --remote`
299299
fetches the submodule's remote repository before calculating the
300300
SHA-1. If you don't want to fetch, you should use `submodule update
301301
--remote --no-fetch`.
302+
+
303+
Use this option to integrate changes from the upstream subproject with
304+
your submodule's current HEAD. Alternatively, you can run `git pull`
305+
from the submodule, which is equivalent except for the remote branch
306+
name: `update --remote` uses the default upstream repository and
307+
`submodule.<name>.branch`, while `git pull` uses the submodule's
308+
`branch.<name>.merge`. Prefer `submodule.<name>.branch` if you want
309+
to distribute the default upstream branch with the superproject and
310+
`branch.<name>.merge` if you want a more native feel while working in
311+
the submodule itself.
302312

303313
-N::
304314
--no-fetch::

0 commit comments

Comments
 (0)