path: root/Documentation/git-submodule.txt
diff options
authorDenton Liu <>2019-10-29 17:01:52 (GMT)
committerJunio C Hamano <>2019-10-30 03:48:45 (GMT)
commit26b061007c1259ed4692554994961dd26874e63e (patch)
tree88e9e2272c173351cf26df641cb19de68d16ef99 /Documentation/git-submodule.txt
parent566a1439f6f56c2171b8853ddbca0ad3f5098770 (diff)
submodule: teach set-url subcommand
Currently, in the event that a submodule's upstream URL changes, users have to manually alter the URL in the .gitmodules file then run `git submodule sync`. Let's make that process easier. Teach submodule the set-url subcommand which will automatically change the `submodule.$name.url` property in the .gitmodules file and then run `git submodule sync` to complete the process. Signed-off-by: Denton Liu <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-submodule.txt')
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 1f46380..285486d 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -16,6 +16,7 @@ SYNOPSIS
'git submodule' [--quiet] deinit [-f|--force] (--all|[--] <path>...)
'git submodule' [--quiet] update [<options>] [--] [<path>...]
'git submodule' [--quiet] set-branch [<options>] [--] <path>
+'git submodule' [--quiet] set-url [--] <path> <newurl>
'git submodule' [--quiet] summary [<options>] [--] [<path>...]
'git submodule' [--quiet] foreach [--recursive] <command>
'git submodule' [--quiet] sync [--recursive] [--] [<path>...]
@@ -180,6 +181,11 @@ set-branch (-d|--default) [--] <path>::
`--default` option removes the submodule.<name>.branch configuration
key, which causes the tracking branch to default to 'master'.
+set-url [--] <path> <newurl>::
+ Sets the URL of the specified submodule to <newurl>. Then, it will
+ automatically synchronize the submodule's new remote URL
+ configuration.
summary [--cached|--files] [(-n|--summary-limit) <n>] [commit] [--] [<path>...]::
Show commit summary between the given commit (defaults to HEAD) and
working tree/index. For a submodule in question, a series of commits