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

Re: Difference between pull --rebase and fetch+rebase

From
SBSanti Béjar <santi@agolina.net>
Date
Jan 7, 2010, 22:33 UTC
Message-ID
<adf1fd3d1001071433j6cd36641sdd2dfd6a936d8483@mail.gmail.com>
In-Reply-To
<1262889864880-4268064.post@n2.nabble.com>
[Do not top post, as it breaks the conversation flow]

On Thu, Jan 7, 2010 at 7:44 PM, martinvz <martin.von.zweigbergk@gmail.com> wrote:

Show 16 quoted lines
>
> Thanks for your post, Santi. I can not share my repository since it is a
> project at work. I was troubleshooting a bit myself and found the following
> section in git-pull.sh:
>
>        oldremoteref="$(git rev-parse -q --verify "$remoteref")" &&
>        for reflog in $(git rev-list -g $remoteref 2>/dev/null)
>        do
>                if test "$reflog" = "$(git merge-base $reflog $curr_branch)"
>                then
>                        oldremoteref="$reflog"
>                        break
>                fi
>        done
>
> Why is it that reflog entries are allowed to override the remote reference?

This is used when the upstream branch is rebased, as you only want to rebase the local commits and not commits in the old upstream branch.

Is your upstream branch rebased?

Can you provide, at least, a graph of your history (ala git log --graph --oneline for example)? And plot also the reflog entries and all the important commits.

Santi
Previous: martinvzNext: martinvz
Message 5 of 8 in “Difference between pull --rebase and fetch+rebase”
  1. martinvzJan 7, 2010
  2. martinvzJan 7, 2010
  3. Santi BéjarJan 7, 2010
  4. martinvzJan 7, 2010
  5. Santi BéjarJan 7, 2010
  6. martinvzJan 7, 2010
  7. Santi BéjarJan 8, 2010
  8. martinvzJan 8, 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.