basic flow hg add a b hg commit a -m "added a" # commit specific file hg push discard local changes hg revert file # revert file hg revert --all log recent commits git log --limit 5 undo most recent commit and keep in working directory hg strip --keep -r .