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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> Matthieu Moy wrote:
>
>> --- a/Documentation/user-manual.txt
>> +++ b/Documentation/user-manual.txt
>> @@ -1716,6 +1721,10 @@ one step:
>>  $ git pull origin master
>>  -------------------------------------------------
>>
>> +This command will fetch the changes from the remote branch to your
>> +remote-tracking branch `origin/master`, and merge the result in the
>> +current branch.
>> +
>
> I wish. :)  Actually this fetched to FETCH_HEAD and left origin/master
> alone the last time I checked.

Woops, right. I actually learnt and experimented that behavior today
when reading the doc, so I've got no excuse ;-).

We can drop this hunk, but I think it's important for users to
understand the two steps of "git pull". What about this:

@@ -1716,14 +1721,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 the changes from the remote branches to your
+remote-tracking branches `origin/*`, and merge default branch in 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


The difficulty is to be technically sound and still helpfull. I've
written "merge default branch" to avoid entering the details of the
--set-upstream stuff, and avoid saying "merge one of the branch"
too ;-).

(the first part of the patch is just to make it technically accurate)

--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]