3 ms·
I think the pedantic answer is "if so, your branches/commits are too big." In practice, what you describe is often the case, and having a quick shortcut to do
by zbentley 2y ago
I think the pedantic answer is "if so, your branches/commits are too big."
In practice, what you describe is often the case, and having a quick shortcut to do "stick $small_fix in main via a separate branch, but yoink that commit into my branch before that first branch lands on main so I can keep working" would be very useful.
Historically, though, I usually addressed this need by copy/pasting the code into separate commits in both branches, and being careful to keep the $small_fix-to-main code and its twin in my larger branch un-drifted and textually discrete to make the eventual merge conflict a rubber-stamp to resolve. Ugly, yes. Maybe I should feel guilty about it, who knows?
- stouset 2y agoThat sounds like a lot of work. And it is a lot of work. Even in the best case. I know it is because I used to do exactly this. But more often than not the small fix ends up getting affected by your changes in the branch and then you're in rebase hell again.