Nov 9, 2011

Mercurial HowTo

Tutorial
http://hginit.com/01.html

How to correctly close a feature branch in Mercurial?
hg up feature-x
hg ci -m 'branch closed' --close-branch

hg up default
hg merge feature-x
hg ci -m merge
To completely undo the uncommitted merge and discard all local modifications, you will need to issue a
# note the "dot" at the end of the command
hg update -C -r .

Merge or rebase with uncommitted changes

hg diff > somefile.diff
hg revert -a
hg import --no-commit somefile.diff

Undo not pushed commit

hg rollback

No comments: