Mercurial - Source Control Management

From Yggenyk
Jump to navigation Jump to search


Mercurial SCM - Source Control Management

The convert extension converts repositories from other SCMs (or even Mercurial itself) into Mercurial repositories.

Eclipse and Mercurial
Visual Studio and Mercurial


TortoiseHg Workbench


Graft to local.png

copy changes from other branches onto the current branch

This command uses Mercurial's merge logic to copy individual changes from other branches without merging branches in the history graph. This is sometimes known as 'backporting' or 'cherry-picking'. By default, graft will copy user, date, and description from the source changesets.

Changesets that are ancestors of the current revision, that have already been grafted, or that are merges will be skipped.

If a graft merge results in conflicts, the graft process is interrupted so that the current merge can be manually resolved. Once all conflicts are addressed, the graft process can be continued with the -c/--continue option.


One-level undo. Will undo the last pull or commit (can be dangerous)


Create a new commit that is the inverse of a given commit.
Net effect is an undo, but the change remains in your history.


Remove (destroy) changes from history.
Removing a changeset also removes all of its children, so it can only be used to truncate history, not remove a slice.


If you want to undo a Merge that is not already committed (because you cancelled it) you can Update to the last revision. It will give you an option to revert changes not already committed.