From: "Robert Dailey" <rcdailey.lists@xxxxxxxxx>
Suppose I have a branch with 4 commits, in the following order (as you might see during interactive rebase): pick 123 Original Change pick 789 fixup! Original Change pick 456 Some Other Thing pick abc fixup! fixup! Original Change However, let's say the first commit is already pushed upstream on a topic branch. Since there are multiple developers on this topic branch, I do not want to rebase right now. Instead, I want to document future fixups via fixup commits and then when we're ready to merge, do a final rebase prior to the merge to master to clean things up after we're all done collaborating. For this specific situation, since the first commit is already pushed, I want to perform a fixup on the 1st fixup commit. When I perform an interactive rebase against upstream topic, I get the following: pick 789 fixup! Original Change pick 456 Some Other Thing pick abc fixup! fixup! Original Change The tip commit (abc in this case) is not marked as a fixup. What I expect to see is: pick 789 fixup! Original Change fixup abc fixup! fixup! Original Change pick 456 Some Other Thing Is this by design, or a defect? I assumed that Git would only look at the first occurrence of "fixup!" and treat everything else after as the commit description to match. But it seems in this case that it stops at the last occurrence of "fixup!", which would explain why it isn't matching in the interactive rebase. I haven't looked at the code, though.
As I understand this it's implied by design. The issue is that the rebase is looking for that named commit within its current rebase range, and can't find it, so ignores it.
There is a separate issue that all the fixup! fixup! messages are essentially treated as being concatenations of the original fixup!, no matter how many time the fiup is present.
In the mean time you should reword those commit messages as being 'bug-fixes' as they are (you say) already upstream and hence published. You can make the first as a bug-fix and the following ones a fixup!s.
Thoughts? Also I'm perfectly willing to accept feedback involving me just using the feature wrong or as not intended. Thanks in advance.