|
|
|
|
|
by randallsquared
5632 days ago
|
|
I haven't used mercurial in anger, and mostly use subversion instead (because that's what my workplace uses at the moment), but: 1) sometimes you commit by accident. This happens to me a few times a year, from hitting the up arrow the wrong number of times and pressing enter. 2) sometimes you say something in a commit message that turns out not to be true, or is just a typo, and especially if you're using commit messages to tie commits to tickets in your bug tracker, this can make code show up on the wrong ticket, or not at all, which is quite confusing for a later maintainer. |
|
I use it all the time to fix typos, add a file I forgot to add, or whatever. Once you push, it is more difficult, but I try not to push my code until it works. I also commit only tested chunks of code, so that is the "unit of work" I aim for.
The equivalent in git is something stupid, I have to look it up every time: git reset --soft HEAD^
That's intuitive!