uncommit

Contents

uncommit part or all of a local changeset (EXPERIMENTAL)

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

Change manipulation

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 uncommitting
--allow-dirty-working-copy
 allow uncommit with outstanding changes
-n, --note <TEXT>
 store a note on uncommit
-I, --include <PATTERN[+]>
 include names matching the given patterns
-X, --exclude <PATTERN[+]>
 exclude names matching the given patterns
-m, --message <TEXT>
 use text as commit message
-l, --logfile <FILE>
 read commit message from file
-d, --date <DATE>
 record the specified date as commit date
-u, --user <USER>
 record the specified user as committer
-D, --currentdate
 record the current date as commit date
-U, --currentuser
 record the current user as committer

[+] marked option can be specified multiple times