Re: fetch and pull

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

 



Jakub Narebski <jnareb@xxxxxxxxx> writes:

> "John Dlugosz" <JDlugosz@xxxxxxxxxxxxxxxx> writes:
>
>> So, after inspecting the changes, how do you fast-forward your local dev
>> to sync up with origin/dev?
>> 
>> I'm worried that
>> 
>> 	git pull origin dev
>> 
>> will try to merge into the current head.  The documentation indicates
>> "The remote ref that matches <src> is fetched, and if <dst> is not empty
>> string, the local ref that matches it is fast forwarded using <src>."
>> which is what I want, but it does NOT say that the normal behavior of
>> merging origin/dev into the =current= HEAD, if it happens to not be the
>> local dev.
>> 
>> So, does it indeed suppress that behavior if you give it an explicit
>> destination?  Or will I have to checkout dev first before doing the
>> pull, to prevent strange things from happening?  Hmm, or perhaps I
>> should be using merge, not pull?  After all, pull is really just a
>> wrapper around fetch and then merge, right?  So is it OK to call merge
>> when I really want to fast-forward, and is there an option to give an
>> error if it isn't ff?
>
> There was patch series adding support --ff=only, but I think it didn't
> made into git...  Hmmm...

I do not think it has much to do with the main point of what John wants to
do which is to muck with local branch without checking it out, which is
only possible when it happens to fast forward to the new tip of the
corresponding branch obtained from the the remote.

--
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]

  Powered by Linux