Hacker News new | ask | show | jobs
by moron4hire 4013 days ago
I don't think I've ever seen anyone advocate rewriting shared history.
1 comments

I've came across reasons, but they've always been pretty marginal, such as somebody checking in sensitive credentials without realising what they were doing.
I think I would like the ability to edit commit messages for typos without having to force everyone to reset --hard.
The thing is, the commit message is part of the commit, not something separate from it. Irritating as it might be, this is good for traceability.

What I do to avoid that is work on a separate branch, rebase against master, then review the commits on my branch after getting rid of any WIP commits and shuffling them around to make more sense. Finally, I make sure the commit messages are (a) accurate and (b) have no typos. Once I'm satisfied with that, I merge.

I treat merging as a big deal, but not committing.