@matheusbsbs / matheus-bagliano / commits / 66a062a125
Fork 0

user-manual.txt: explain better the remote(-tracking) branch terms

Now that the documentation is mostly consistant in the use of "remote branch" Vs "remote-tracking branch", let's make this distinction explicit early in the user-manual. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matthieu Moy committed Nov 2, 2010 at 22:06 UTC 66a062a1259000669cec0a8105a807a67b9287ef
1 file changed +16 -3
Documentation/user-manual.txt
+16 -3
@@ -344,7 +344,8 @@ Examining branches from a remote repository
344 The "master" branch that was created at the time you cloned is a copy
345 of the HEAD in the repository that you cloned from. That repository
346 may also have had other branches, though, and your local repository
347 -keeps branches which track each of those remote branches, which you
347 +keeps branches which track each of those remote branches, called
348 +remote-tracking branches, which you
349 can view using the "-r" option to linkgit:git-branch[1]:
350
351 ------------------------------------------------
@@ -359,6 +360,13 @@ $ git branch -r
360 origin/todo
361 ------------------------------------------------
362
363 +In this example, "origin" is called a remote repository, or "remote"
364 +for short. The branches of this repository are called "remote
365 +branches" from our point of view. The remote-tracking branches listed
366 +above were created based on the remote branches at clone time and will
367 +be updated by "git fetch" (hence "git pull") and "git push". See
368 +<<Updating-a-repository-With-git-fetch>> for details.
369 +
370 You cannot check out these remote-tracking branches, but you can
371 examine them on a branch of your own, just as you would a tag:
372
@@ -1716,14 +1724,19 @@ one step:
1724 $ git pull origin master
1725 -------------------------------------------------
1726
1719 -In fact, if you have "master" checked out, then by default "git pull"
1720 -merges from the HEAD branch of the origin repository. So often you can
1727 +In fact, if you have "master" checked out, then this branch has been
1728 +configured by "git clone" to get changes from the HEAD branch of the
1729 +origin repository. So often you can
1730 accomplish the above with just a simple
1731
1732 -------------------------------------------------
1733 $ git pull
1734 -------------------------------------------------
1735
1736 +This command will fetch changes from the remote branches to your
1737 +remote-tracking branches `origin/*`, and merge the default branch into
1738 +the current branch.
1739 +
1740 More generally, a branch that is created from a remote-tracking branch
1741 will pull
1742 by default from that branch. See the descriptions of the