From 26b061007c1259ed4692554994961dd26874e63e Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Tue, 29 Oct 2019 10:01:52 -0700 Subject: 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 --- Documentation/git-submodule.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation/git-submodule.txt') diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 1f46380af2..285486d0a8 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -16,6 +16,7 @@ SYNOPSIS 'git submodule' [--quiet] deinit [-f|--force] (--all|[--] ...) 'git submodule' [--quiet] update [] [--] [...] 'git submodule' [--quiet] set-branch [] [--] +'git submodule' [--quiet] set-url [--] 'git submodule' [--quiet] summary [] [--] [...] 'git submodule' [--quiet] foreach [--recursive] 'git submodule' [--quiet] sync [--recursive] [--] [...] @@ -180,6 +181,11 @@ set-branch (-d|--default) [--] :: `--default` option removes the submodule..branch configuration key, which causes the tracking branch to default to 'master'. +set-url [--] :: + Sets the URL of the specified submodule to . Then, it will + automatically synchronize the submodule's new remote URL + configuration. + summary [--cached|--files] [(-n|--summary-limit) ] [commit] [--] [...]:: Show commit summary between the given commit (defaults to HEAD) and working tree/index. For a submodule in question, a series of commits -- cgit v1.2.3