I'm familiar with using squash to clean up my branch, but the text for squashing is
use commit, but meld into previous commit
, which will use the message from the previous commit. I wondering if there's a way to make it quickly use the later commit (or rather, roll up the file changes and use the later commit's message)
An example:
- 443f7287: "Fixes a lot of stuff" (Second commit chronologically)
- Files A, B, and C
- 0ebbd9c0: "Partial commit from when I had to switch tracks temporarily" (first commit chronologically)
- Files D, E, and F
Run something here and end up with
- 443f7287: "Fixes a lot of stuff"
- Files A, B, C, D, E, and F
I know I could do this with rebase, by squashing 443f7287 and then manually copying its commit message onto the resulting commit, but I'm hoping for a one-liner without the interactive-rebase screens. Theoretically, I could stash my changes when I change tracks instead of committing them, but I haven't really gotten a lot of traction when trying to learn stash.
Is there any way to quickly achieve my goals? Is there a better solution?