uncommit

Description

This command undoes the effect of a local commit, returning the affected files to their uncommitted state. This means that files modified, added or removed in the changeset will be left unchanged, and so will remain modified, added and removed in the working directory.

Commands

unamend

undo the most recent amend operation on a current changeset:

hg unamend

This command will roll back to the previous version of a changeset, leaving working directory in state in which it was before running hg amend (e.g. files modified as part of an amend will be marked as modified hg status)

uncommit

uncommit part or all of a local changeset:

hg uncommit [OPTION]... [FILE]...

This command undoes the effect of a local commit, returning the affected files to their uncommitted state. This means that files modified or deleted in the changeset will be left unchanged, and so will remain modified in the working directory.

If no files are specified, the commit will be pruned, unless --keep is given.

Options:

--keep allow an empty commit after uncommiting
-I, --include <PATTERN[+]>
 include names matching the given patterns
-X, --exclude <PATTERN[+]>
 exclude names matching the given patterns

[+] marked option can be specified multiple times