summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1393123)
raw | patch | inline | side by side (parent: 1393123)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Tue, 2 Nov 2010 21:06:20 +0000 (22:06 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 3 Nov 2010 16:20:47 +0000 (09:20 -0700) |
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>
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>
Documentation/user-manual.txt | patch | blob | history |
index d70f3e04ffec209e1406d75c9051fd12f49b22f1..85b3175ff6858843b8b875fb5e7822b68ccd5f07 100644 (file)
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]:
------------------------------------------------
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:
$ 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