|
|
|
|
|
by 100k
5630 days ago
|
|
It is trivial in Mercurial to back out the last commit: hg rollback 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! |
|
And if you really forget it often, add this to your ~/.gitconfig:
Now you can run `git rollback`