To reproduce:
1. Create two commits with the same commit message *subject* (that is, the first line of the commit message). Let's say the first commit gets commit ID "a", and the second one gets commit ID "b".
1. (Optionally create some other commits.)
1. Create a fixup commit for commit "b" by running
git commit --fixup=b
.
1. Run git rebase --interactive
.
At this point I would expect the fixup commit to be listed after the commit I told it to merge with, "b". Instead it is instead listed after commit "a"! Presumably this happens because because the fixup commit message, instead of mentioning the commit ID I wanted to merge with, has a subject like "fixup! [subject of commit a and b]". And so Git lost the information I tried to convey about which commit I wanted to merge with.
Is there some way to configure Git to do the expected thing? For example by changing the fixup commit subject to something like "fixup! [ID of commit b]"?
Asked by l0b0
(53368 rep)
Aug 5, 2025, 01:32 PM
Last activity: Aug 5, 2025, 02:44 PM
Last activity: Aug 5, 2025, 02:44 PM