git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Question about "git pull --rebase"

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 15, 2009, 20:18 UTC
Message-ID
<7vlji7k0dm.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4B005AEC.1000002@gmail.com>
Johan 't Hart <johanthart@gmail.com> writes:
Show 28 quoted lines
> Francis Moreau schreef:
>> Looks like you did :)
>>
>> I've been somehow confused by the git-pull man page, which says:
>>
>>   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 I thought that both of the commands were equivalent for 'git pull
>> --rebase'.
>>
>> Thanks for the explanation.
>
> Ah that part.
>
> It means that
> $ git pull --rebase origin master
>
> means the same as:
> $ git pull --rebase origin master:
> (note extra colon at the end)
>
> But not as:
> $ git pull --rebase origin master:foo
>
> It means that, when you give a refspec without a colon, it is the same
> as the refspec with the colon and without the right side.
Thanks for clearing it up.

I was puzzled by the above pointing-finger because I wanted to see where a misinformation originated from to fix it at the source. But still don't see anything wrong with it.

Perhaps there was some other part of the manual that confused Francis to think master: and master:foo are equivalent in that context? I somehow doubt it, but if there is one, we would need to fix that

In a separate thread, Thomas reported a gross misinformation in github wiki he recently fixed:

    From: Thomas Rast <trast@student.ethz.ch>
    Subject: Re: [PATCH] pull: refuse complete src:dst fetchspec arguments
    Date: Sun, 15 Nov 2009 13:24:03 +0100
    Message-ID: <200911151324.05109.trast@student.ethz.ch>
Perhaps that page had some impact on this misunderstanding? 
Previous: Johan 't HartNext: Johan 't Hart
Message 7 of 10 in “Question about "git pull --rebase"”
  1. Francis MoreauNov 14, 2009
  2. Nanako ShiraishiNov 14, 2009
  3. Francis MoreauNov 15, 2009
  4. Johan 't HartNov 14, 2009
  5. Francis MoreauNov 15, 2009
  6. Johan 't HartNov 15, 2009
  7. Junio C HamanoNov 15, 2009
  8. Johan 't HartNov 15, 2009
  9. Francis MoreauNov 16, 2009
  10. Francis MoreauNov 16, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.