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

Re: git pull --rebase differs in behavior from git fetch + git rebase

From
Joshua Jensen <jjensen@workspacewhiz.com>
Date
Aug 27, 2010, 22:29 UTC
Message-ID
<4C783C66.3000008@workspacewhiz.com>
In-Reply-To
<AANLkTimEO==c7Pzi99VfvDp7S9HN=V2j6t0kk--w1kb9@mail.gmail.com>
  ----- Original Message -----
From: Elijah Newren
Date: 8/27/2010 12:46 PM
Show 31 quoted lines
> On Fri, Aug 27, 2010 at 9:48 AM, Joshua Jensen
> <jjensen@workspacewhiz.com>  wrote:
>>> The main difference between "git pull --rebase" and "git fetch&&  git
>>> rebase @{u}" is that "git pull --rebase" will attempt to use the reflog
>>> to find a suitable "upstream" candidate instead of assuming your
>>> tracking branch is the upstream itself.  This is intended to help
>>> recover from upstream rebases, but has adverse effects sometimes, which
>>> commit cf65426de should help with.
>> Unfortunately, commit cf65426de helps only a little.  The 'git pull
>> --rebase' reports "Nothing to do" and moves the master branch to
>> origin/master, leaving behind the commit needing to be rebased.
>>
>> What else might there be to try?  I would like to help with a repro, if
>> possible.
> Try modifying the git-pull script; change the last line from
>    eval "exec $eval"
> to
>    echo "exec $eval"
> .
>
> Is the output of the form
>    git-rebase --onto XXXX YYYY
> or
>    git-rebase --onto XXXX XXXX
> ?
>
> With cf65426de, and from what I'm guessing from your description, I'd
> expect the latter.  And, I'd assume the latter is equivalent to
> 'git-rebase XXXX', but you say that's not the behavior you're getting.
>   Finding out which of my assumptions is wrong may help you debug the
> issue.
It reports to me 'git-rebase --onto XXXX XXXX'.
And it reports nothing to do.
XXXX is properly the origin/master in this case.

git rebase origin/master works. git rebase --onto origin/master origin/master does not work.

Thoughts?
Josh
Previous: Elijah NewrenNext: Elijah Newren
Message 6 of 10 in “git pull --rebase differs in behavior from git fetch + git rebase”
  1. Joshua JensenAug 27, 2010
  2. Santi BéjarAug 27, 2010
  3. Dave OlszewskiAug 27, 2010
  4. Joshua JensenAug 27, 2010
  5. Elijah NewrenAug 27, 2010
  6. Joshua JensenAug 27, 2010
  7. Elijah NewrenAug 27, 2010
  8. Joshua JensenAug 28, 2010
  9. Elijah NewrenAug 28, 2010
  10. Joshua JensenAug 28, 2010

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.