With git's "commit frequently" style, I often find that I end up with a
commit that includes a typo in a comment or I forgot one call site when
updating functions or something.
And it's a few commits later before I notice the simple oops.
This is of course fixable by making a commit, rebase -i HEAD~4 (or whatever),
and marking the fixup for squashing into the previous commit.
But it would be really handy if there were a one-step command for doing this.
Something like "git commit --fixup HEAD~3", where "git commit --fixup HEAD"
would be equivalent to "git commit --amend".
It would be fine if it were implemented using rebase -i and you had to
use "git rebase --continue" to recover from a conflict. And history had
to be linear from the fixup point to HEAD.
The only thing I'd wish for, that rebase -i doesn't support, is a commit
with a dirty tree. (Because often the typo is noticed in the middle of further
development.) But if I have to manually stash & pop, that would be good enough.
Talking with some friends, they all say "yeah, I would really use that
feature". So I figured I'd mention it here.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html