summaryrefslogtreecommitdiff
path: root/Documentation/git-submodule.txt
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2008-08-24 12:43:37 -0700
committerJunio C Hamano <gitster@pobox.com>2008-08-25 22:48:01 -0700
commit2327f61ecc4e9fbb6dd9fffdec0b043aeaca908f (patch)
tree529417e97ebcd5553e810e02f15321d91f516667 /Documentation/git-submodule.txt
parent27a6ed492b3962d8214a196e57e8969ff9772249 (diff)
downloadgit-2327f61ecc4e9fbb6dd9fffdec0b043aeaca908f.tar.gz
git-submodule: add "sync" command
When a submodule's URL changes upstream, existing submodules will be out of sync since their remote."$origin".url will still be set to the old value. This adds a "git submodule sync" command that reads submodules' URLs from .gitmodules and updates them accordingly. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r--Documentation/git-submodule.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index abbd5b72de..babaa9bc46 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -15,6 +15,7 @@ SYNOPSIS
'git submodule' [--quiet] update [--init] [--] [<path>...]
'git submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
'git submodule' [--quiet] foreach <command>
+'git submodule' [--quiet] sync [--] [<path>...]
DESCRIPTION
@@ -139,6 +140,14 @@ foreach::
As an example, "git submodule foreach 'echo $path `git rev-parse HEAD`' will
show the path and currently checked out commit for each submodule.
+sync::
+ Synchronizes submodules' remote URL configuration setting
+ to the value specified in .gitmodules. This is useful when
+ submodule URLs change upstream and you need to update your local
+ repositories accordingly.
++
+"git submodule sync" synchronizes all submodules while
+"git submodule sync -- A" synchronizes submodule "A" only.
OPTIONS
-------