LinuxCommandLibrary

hg-commit

saves changes to the repository as a new changeset

TLDR

Commit all changes

$ hg commit -m "[message]"
copy
Commit specific files
$ hg commit [file1] [file2] -m "[message]"
copy
Commit with editor for message
$ hg commit
copy
Amend the last commit
$ hg commit --amend
copy
Close a branch
$ hg commit --close-branch -m "[message]"
copy

SYNOPSIS

hg commit [options] [file...]

DESCRIPTION

hg commit saves changes to the repository as a new changeset. With no files specified, all modified files are committed. Use -m for inline message or omit it to open an editor. The --amend flag modifies the parent commit instead of creating a new one.

PARAMETERS

-m, --message text

Commit message.
-A, --addremove
Add/remove files before committing.
--amend
Amend the parent changeset.
-u, --user user
Record user as committer.
-d, --date date
Record date as commit date.
--close-branch
Mark branch as closed.

SEE ALSO

hg(1), hg-add(1), hg-status(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community