Re: Question about "git pull --rebase"

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

 



Quoting Francis Moreau <francis.moro@xxxxxxxxx>

> Let's say I'm on a branch called 'foo'.
> ...
>     $ git pull --rebase origin master:foo

With this command line, you are asking:

 1) Please first fetch master from origin and update the local 
    'foo' with it, but please fail if this doesn't fast forward;

 2) If the first step was successful, please rebase the current 
    branch on top of that commit.

If your current branch 'foo' doesn't fast forward, the first step 
should fail, and that is the failure you saw.

Your request doesn't make any sense. The first step would succeed 
only when your 'foo' doesn't have anything to replay on 'master' 
from origin, and the second step either isn't executed (when 'foo' 
has some commits), or it doesn't do anything (when 'foo' doesn't 
have any commit).

>     $ git pull --rebase origin master

With this command line, you are asking:

 1) Please first fetch master from origin, but don't store it anywhere;

 2) Then on top of that fetched commit, please rebase the current branch.

That is a much saner request.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

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