From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>,
Jens Lehmann <Jens.Lehmann@web.de>,
Heiko Voigt <hvoigt@hvoigt.net>
Subject: [RFC/PATCH 3/4] submodules: update docs to reflect remotes.
Date: Wed, 8 Apr 2015 12:58:24 +0200 [thread overview]
Message-ID: <1428490705-11586-4-git-send-email-ps@pks.im> (raw)
In-Reply-To: <1428490705-11586-1-git-send-email-ps@pks.im>
---
Documentation/git-submodule.txt | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 2c25916..a49a2ad 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -21,6 +21,9 @@ SYNOPSIS
[commit] [--] [<path>...]
'git submodule' [--quiet] foreach [--recursive] <command>
'git submodule' [--quiet] sync [--recursive] [--] [<path>...]
+'git submodule' [--quiet] remote add <path> <name> <url>
+'git submodule' [--quiet] remote rm <path> <name>
+'git submodule' [--quiet] remote set-url [--push] <path> <name> <url>"
DESCRIPTION
@@ -233,6 +236,22 @@ As an example, +git submodule foreach \'echo $path {backtick}git
rev-parse HEAD{backtick}'+ will show the path and currently checked out
commit for each submodule.
+remote::
+ Modify a submodule's remote configuration. The command has subcommands that
+ mirror the commands of `git remote`. The change will be reflected inside
+ of the .gitmodules file the submodule is specified in. Changes will be
+ synchronized with the submodule by running `git submodule sync`.
++
+ `git submodule remote add <sm_path> <remote> <url>`;;
+ add a new remote with the URL specified to the submodule
+ `git submodule remote rm <sm_path> <remote>`;;
+ remove a remote with the given name for the specified submodule
+ `git submodule remote show [-v|--verbose] <sm_path>`;;
+ show configured remotes for the submodule. If `--verbose` is specified,
+ also print URLs.
+ `git submodule remote set-url [--push] <sm_path> <remote> <url>`;;
+ set the (push) URL for the given remote name and submodule.
+
sync::
Synchronizes submodules' remote URL configuration setting
to the value specified in .gitmodules. It will only affect those
@@ -240,6 +259,10 @@ sync::
case when they are initialized or freshly added). This is useful when
submodule URLs change upstream and you need to update your local
repositories accordingly.
+
+ Also synchronizes all remotes that have been configured in .gitmodules.
+ Missing remotes will be added to the submodule while existing ones will be
+ updated according to the configured fetch or push URLs.
+
"git submodule sync" synchronizes all submodules while
"git submodule sync \-- A" synchronizes submodule "A" only.
--
2.3.5
next prev parent reply other threads:[~2015-04-08 11:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 10:58 [RFC/PATCH 0/4] submodule remotes Patrick Steinhardt
2015-04-08 10:58 ` [RFC/PATCH 1/4] submodules: implement synchronizing of remotes Patrick Steinhardt
2015-04-08 15:46 ` Junio C Hamano
2015-04-09 11:57 ` Patrick Steinhardt
2015-04-08 10:58 ` [RFC/PATCH 2/4] submodules: implement remote commands Patrick Steinhardt
2015-04-08 10:58 ` Patrick Steinhardt [this message]
2015-04-08 10:58 ` [RFC/PATCH 4/4] submodules: add bash completion for remotes Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428490705-11586-4-git-send-email-ps@pks.im \
--to=ps@pks.im \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).