git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 08/10] user-manual.txt: explain better the remote(-tracking) branch terms

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Nov 2, 2010, 15:31 UTC
Message-ID
<1288711888-21528-9-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<1288711888-21528-1-git-send-email-Matthieu.Moy@imag.fr>

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>
---
 Documentation/user-manual.txt |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index d70f3e0..6d6bd8d 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -344,7 +344,8 @@ Examining branches from a remote repository
 The "master" branch that was created at the time you cloned is a copy
 of the HEAD in the repository that you cloned from.  That repository
 may also have had other branches, though, and your local repository
-keeps branches which track each of those remote branches, which you
+keeps branches which track each of those remote branches, called
+remote-tracking branches, which you
 can view using the "-r" option to linkgit:git-branch[1]:
 
 ------------------------------------------------
@@ -359,6 +360,13 @@ $ git branch -r
   origin/todo
 ------------------------------------------------
 
+In this example, "origin" is called a remote repository, or "remote"
+for short. The branches of this repository are called "remote
+branches" from our point of view. The remote-tracking branches listed
+above were created based on the remote branches at clone time and will
+be updated by "git fetch" (hence "git pull) and "git push". See
+<<Updating -a-repository-With-git-fetch>> for details.
+
 You cannot check out these remote-tracking branches, but you can
 examine them on a branch of your own, just as you would a tag:
 
@@ -1716,14 +1724,19 @@ one step:
 $ git pull origin master
 -------------------------------------------------
 
-In fact, if you have "master" checked out, then by default "git pull"
-merges from the HEAD branch of the origin repository.  So often you can
+In fact, if you have "master" checked out, then this branch has been
+configured by "git clone" to get changes from the HEAD branch of the
+origin repository.  So often you can
 accomplish the above with just a simple
 
 -------------------------------------------------
 $ git pull
 -------------------------------------------------
 
+This command will fetch changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge the default branch into
+the current branch.
+
 More generally, a branch that is created from a remote-tracking branch
 will pull
 by default from that branch.  See the descriptions of the
-- 
1.7.3.2.183.g2e7b0
Previous: Jonathan NiederNext: Peter Krefting
Message 13 of 17 in “More consistant terminology”
  1. 00/10 More consistant terminologyMatthieu Moy, Nov 2, 2010
  2. 01/10 Better "Changed but not updated" message in git-statusMatthieu Moy, Nov 2, 2010
  3. 02/10 Replace "remote tracking" with "remote-tracking"Matthieu Moy, Nov 2, 2010
  4. 03/10 Change remote tracking to remote-tracking in non-trivial placesMatthieu Moy, Nov 2, 2010
  5. 04/10 everyday.txt: change "tracking branch" to "remote-tracking branch"Matthieu Moy, Nov 2, 2010
  6. 05/10 Change "tracking branch" to "remote-tracking branch"Matthieu Moy, Nov 2, 2010
  7. Santi BéjarNov 2, 2010
  8. Forgotten 'tracking' -> 'remote-tracking'Matthieu Moy, Nov 2, 2010
  9. 06/10 Change incorrect uses of "remote branch" meaning "remote-tracking"Matthieu Moy, Nov 2, 2010
  10. 07/10 Change incorrect "remote branch" to "remote tracking branch" in C codeMatthieu Moy, Nov 2, 2010
  11. What's the -s switch in git show?Will Hall, Nov 9, 2010
  12. Documentation: document show -sJonathan Nieder, Nov 9, 2010
  13. 08/10 user-manual.txt: explain better the remote(-tracking) branch termsMatthieu Moy, Nov 2, 2010
  14. Peter KreftingNov 2, 2010
  15. user-manual.txt: explain better the remote(-tracking) branch termsMatthieu Moy, Nov 2, 2010
  16. 09/10 user-manual: remote-tracking can be checked out, with detached HEADMatthieu Moy, Nov 2, 2010
  17. 10/10 git-branch.txt: mention --set-upstream as a way to change upstream configurationMatthieu Moy, Nov 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.