hg update -C .
git reset –hard
hg update -C .
git reset –hard
Discard uncommitted changes
hg clone git+ssh://user@server/directory [“Target directory”]
Clone a git repository into a mercurial one, only working with hg-git extension
git add -u .
Add and remove files to prepare for commit. Same as “addremove” in mercurial
git checkout .
Revert to last commit, discard all changes since last commit.
git commit -a -m “<Checkin comment>”
Checkin all files, add and remove files
git add -A && git commit -m “Your Message”
Checkin all files including new and deleted files
If you have a problem with not trusted files, here is the solution:
[trusted] users = user,[, user2...]
[trusted] users = root
End trunc and merge with other trunk
$ hg commit --close-branch -m 'Ready for merge'
$ hg update default
$ hg merge mybranch
$ hg commit -m 'Integrated mybranch'