lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Support fixup with keeping the message of the selected commit

Open stefanhaller opened this issue 7 months ago • 2 comments

  • PR Description

@jesseduffield in #4514:

Right now you're able to fixup a commit down into the commit below. That is, you combine the two commits and retain the message of the lower commit. However, often I find myself wanting to preserve the message of the higher commit.

This PR makes this possible by replacing the confirmation with a menu that asks the user which commit message to retain.

Fixes #4514.

stefanhaller avatar Apr 30 '25 16:04 stefanhaller

This is a draft PR because I'm not convinced about the UI yet, the strings are not i18n'ed, and there are no tests.

Also, in an interactive rebase I added a preliminary visualization of which way the fixup goes (fixup↓ for the normal case, fixup← for when we retain the message of the commit that is squashed down. I don't like this very much, but I do feel it would be good to visualize this somehow.

stefanhaller avatar Apr 30 '25 16:04 stefanhaller

Nice, I'll give this branch a go and see how I find it

jesseduffield avatar Apr 30 '25 22:04 jesseduffield