LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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.
-i, --interactive
Interactively select which changes to include.
-I, --include PATTERN
Include only files matching the given pattern.
-X, --exclude PATTERN
Exclude files matching the given pattern.
-l, --logfile FILE
Read commit message from file.
-s, --secret
Use the secret phase for committing.

CAVEATS

Only tracked files are committed; new files need hg add or -A first. --amend rewrites history and should be avoided on already-shared changesets.

HISTORY

Commit is a core Mercurial command, present since the project's first release in 2005.

SEE ALSO

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

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid