Skip to content

Commit

Permalink
Documentation: describe 'submodule update --remote' use case
Browse files Browse the repository at this point in the history
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 <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
W. Trevor King authored and Junio C Hamano committed Feb 24, 2014
1 parent 23d25e4 commit 9937e65
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Documentation/git-submodule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,16 @@ In order to ensure a current tracking branch state, `update --remote`
fetches the submodule's remote repository before calculating the
SHA-1. If you don't want to fetch, you should use `submodule update
--remote --no-fetch`.
+
Use this option to integrate changes from the upstream subproject with
your submodule's current HEAD. Alternatively, you can run `git pull`
from the submodule, which is equivalent except for the remote branch
name: `update --remote` uses the default upstream repository and
`submodule.<name>.branch`, while `git pull` uses the submodule's
`branch.<name>.merge`. Prefer `submodule.<name>.branch` if you want
to distribute the default upstream branch with the superproject and
`branch.<name>.merge` if you want a more native feel while working in
the submodule itself.

-N::
--no-fetch::
Expand Down

0 comments on commit 9937e65

Please sign in to comment.