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

Re: rebase -p loses amended changes

From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Date
Apr 5, 2012, 16:43 UTC
Message-ID
<CAOeW2eHJYiHswmzJeMnce5cpcA7zFi7kiH9CsZdNcHB7G+CtUA@mail.gmail.com>
In-Reply-To
<CAH3AnrrYVNDN4cY7EmFsFyjC50wifuoPj1jSLPTxsSUy5+4aiQ@mail.gmail.com>
On Thu, Apr 5, 2012 at 9:33 AM, Jon Seymour <jon.seymour@gmail.com> wrote:
Show 23 quoted lines
>>
>> With this history
>>
>>          .-e-.
>>         /     \
>>      .-c---d---f
>>     /
>> a---b---g
>>
>> , "git rebase -p --onto g b f" produces
>>
>>
>>              .-e'.
>>             /     \
>> a---b---g---c'--d'--f'
>>
>
> Perhaps there is a a formatting issue here, but wouldn't the resulting
> history be, instead:
>
>                  . -e'.
>                 /     \
>  a---b---g---c'--d'--f'

That's how it looked before I pasted it into gmail. Sorry about that and thanks for clarifying.

> I don't really understand why e' - c' would be different to e-c?

Not "would", but "could", if you're using -i as well and choose the "edit" action for commit e (or if merge conflict makes it halt while creating e').

Previous: Jon SeymourNext: Johannes Sixt
Message 17 of 18 in “Re: rebase -p loses amended changes”
  1. Jon SeymourMar 31, 2012
  2. Thomas RastMar 31, 2012
  3. Jon SeymourMar 31, 2012
  4. J Robert RayApr 3, 2012
  5. Jon SeymourApr 3, 2012
  6. Junio C HamanoApr 3, 2012
  7. Phil HordApr 3, 2012
  8. Johannes SixtApr 4, 2012
  9. Junio C HamanoApr 4, 2012
  10. Junio C HamanoApr 4, 2012
  11. Jon SeymourApr 4, 2012
  12. Junio C HamanoApr 4, 2012
  13. Jon SeymourApr 4, 2012
  14. Junio C HamanoApr 4, 2012
  15. Martin von ZweigbergkApr 5, 2012
  16. Jon SeymourApr 5, 2012
  17. Martin von ZweigbergkApr 5, 2012
  18. Johannes SixtApr 10, 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.