From: Francis Moreau <francis.moro@gmail.com>
To: Nanako Shiraishi <nanako3@lavabit.com>
Cc: git@vger.kernel.org
Subject: Re: Question about "git pull --rebase"
Date: Sun, 15 Nov 2009 15:31:06 +0100 [thread overview]
Message-ID: <m2r5rzoo5x.fsf@gmail.com> (raw)
In-Reply-To: <20091115081649.6117@nanako3.lavabit.com> (Nanako Shiraishi's message of "Sun, 15 Nov 2009 08:16:49 +0900")
Nanako Shiraishi <nanako3@lavabit.com> writes:
> Quoting Francis Moreau <francis.moro@gmail.com>
>
>> 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.
I see thanks.
Actually I've been confused by the following part of the git-pull man
page:
A parameter <ref> without a colon is equivalent to <ref>: when
pulling/fetching, so it merges <ref> into the current branch without
storing the remote branch anywhere locally
So it sounds that both of the pull commands were equivalent whereas
they're not.
--
Francis
next prev parent reply other threads:[~2009-11-15 14:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 20:39 Question about "git pull --rebase" Francis Moreau
2009-11-14 23:16 ` Nanako Shiraishi
2009-11-15 14:31 ` Francis Moreau [this message]
2009-11-14 23:29 ` Johan 't Hart
2009-11-15 14:34 ` Francis Moreau
2009-11-15 19:47 ` Johan 't Hart
2009-11-15 20:18 ` Junio C Hamano
2009-11-15 20:32 ` Johan 't Hart
2009-11-16 12:00 ` Francis Moreau
2009-11-16 12:17 ` Francis Moreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2r5rzoo5x.fsf@gmail.com \
--to=francis.moro@gmail.com \
--cc=git@vger.kernel.org \
--cc=nanako3@lavabit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).