Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think I've ever seen anyone advocate rewriting shared history.


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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: