Thread (18 messages) flat view 18 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH v2 07/15] user-manual: Mention 'git remote add' for remote branch config

From: W. Trevor King <hidden>
Date: 2016-06-15 22:56:06
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Possibly related (same subject, not in this thread)

From: "W. Trevor King" <redacted>

I hardly ever setup remote.<name>.url using 'git config'.  While it
may be instructive to do so, we should also point out 'git remote
add'.

Signed-off-by: W. Trevor King <redacted>
---
 Documentation/user-manual.txt | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index a68d6b9..424cdd6 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -2909,8 +2909,23 @@ Also note that all of the above configuration can be performed by
 directly editing the file .git/config instead of using
 linkgit:git-config[1].
 
+You can produce a similar configuration with:
+
+-------------------------------------------------
+$ git remote add example git://example.com/proj.git
+-------------------------------------------------
+
+which adds the following stanza to `.git/config`:
+
+-------------------------------------------------
+[remote "example"]
+        url = git://example.com/proj.git
+        fetch = +refs/heads/*:refs/remotes/example/*
+-------------------------------------------------
+
 See linkgit:git-config[1] for more details on the configuration
-options mentioned above.
+options mentioned above and linkgit:git-fetch[1] for more details on
+the refspec syntax.
 
 
 [[git-concepts]]
-- 
1.8.1.336.g94702dd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help