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

Re: rebase problem

From
Vincent van Ravesteijn <vfr@lyx.org>
Date
Mar 17, 2012, 13:30 UTC
Message-ID
<4F649202.4080102@lyx.org>
In-Reply-To
<OF506B5658.3E449452-ONC12579C4.00460A6E-C12579C4.0047355D@transmode.se>
Op 17-3-2012 13:57, Joakim Tjernlund schreef:
Show 22 quoted lines
> A co-worker this on our local u-boot repo:
>    git checkout master
>    git fetch denx/master
>    git merge denx/master
> <resolve conflicts>
>    git commit
>    ...
>    git commit
> Now u-boot is working again
> then update to latest u-boot so:
>    git fetch denx/master
>    git rebase denx/master
> Now it is a mess, that rebase seems to start from way back as a
> staring reference, not from the last merge shown above.
> I guess I forgotten how git works, what did go wrong?
>
>    Jocke
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
The situation is like this:
  master - C - o - o - D - o - o - o - A
                      /
  denx/master- - - - o - o - o - o - B

Now, you ask to rebase master (A) onto denx/master (B). If master would have started from D, it would indeed apply the commits D -- A on top of B. In your case, however, master already had a lot of commits that were not in denx/master: C -- D (including the merge resolution). So it will also apply C -- D on top of B.

Vincent
Previous: Joakim TjernlundNext: Joakim Tjernlund
Message 2 of 5 in “rebase problem”
  1. Joakim TjernlundMar 17, 2012
  2. Vincent van RavesteijnMar 17, 2012
  3. Joakim TjernlundMar 17, 2012
  4. Vincent van RavesteijnMar 17, 2012
  5. Joakim TjernlundMar 17, 2012

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.