From: W. Trevor King Date: Sun, 26 Jan 2014 20:45:16 +0000 (-0800) Subject: Documentation: describe 'submodule update --remote' use case X-Git-Tag: v2.0.0-rc0~157^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9937e65d8835ee6c026892de48f993d7a524a00f 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 2e1c7a28d0..21cb59a6d6 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -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..branch`, while `git pull` uses the submodule's +`branch..merge`. Prefer `submodule..branch` if you want +to distribute the default upstream branch with the superproject and +`branch..merge` if you want a more native feel while working in +the submodule itself. -N:: --no-fetch::