Documentation: update tutorial's discussion of origin
Update tutorial's discussion of origin branch to reflect new defaults, and include a brief mention of git-repo-config. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
J. Bruce Fields committed
Dec 31, 2006 at 18:47 UTC
d66409f068df3a8590524c3224e300194c7c8b6b
1 file changed
+15
-10
Documentation/tutorial.txt
+15
-10
@@ -323,20 +323,25 @@ $ git pull
323
324
Note that he doesn't need to give the path to Alice's repository;
325
when Bob cloned Alice's repository, git stored the location of her
326
-repository in the file .git/remotes/origin, and that location is used
327
-as the default for pulls.
328
-
329
-Bob may also notice a branch in his repository that he didn't create:
326
+repository in the repository configuration, and that location is
327
+used for pulls:
328
329
-------------------------------------
332
-$ git branch
333
-* master
334
- origin
330
+$ git repo-config --get remote.origin.url
331
+/home/bob/myrepo
332
-------------------------------------
333
337
-The "origin" branch, which was created automatically by "git clone",
338
-is a pristine copy of Alice's master branch; Bob should never commit
339
-to it.
334
+(The complete configuration created by git-clone is visible using
335
+"git repo-config -l", and the gitlink:git-repo-config[1] man page
336
+explains the meaning of each option.)
337
+
338
+Git also keeps a pristine copy of Alice's master branch under the
339
+name "origin/master":
340
+
341
+-------------------------------------
342
+$ git branch -r
343
+ origin/master
344
+-------------------------------------
345
346
If Bob later decides to work from a different host, he can still
347
perform clones and pulls using the ssh protocol: