.TH HG COMMIT "" "" "" .SH NAME hg commit \- commit the specified files or all outstanding changes .\" Man page generated from reStructuredText. . .SH SYNOPSIS .sp .nf .ft C hg commit [OPTION]... [FILE]... .ft P .fi .SH DESCRIPTION .sp Commit changes to the given files into the repository. Unlike a centralized SCM, this operation is a local operation. See \%\fBhg push\fP\: for a way to actively distribute your changes. .sp If a list of files is omitted, all changes reported by \%\fBhg status\fP\: will be committed. .sp If you are committing the result of a merge, do not provide any filenames or \-I/\-X filters. .sp If no commit message is specified, Mercurial starts your configured editor where you can enter a message. In case your commit fails, you will find a backup of your message in \fB.hg/last\-message.txt\fP. .sp The \-\-close\-branch flag can be used to mark the current branch head closed. When all heads of a branch are closed, the branch will be considered closed and no longer listed. .sp The \-\-amend flag can be used to amend the parent of the working directory with a new commit that contains the changes in the parent in addition to those currently reported by \%\fBhg status\fP\:, if there are any. The old commit is stored in a backup bundle in \fB.hg/strip\-backup\fP (see \%\fBhg help bundle\fP\: and \%\fBhg help unbundle\fP\: on how to restore it). .sp Message, user and date are taken from the amended commit unless specified. When a message isn\(aqt specified on the command line, the editor will open with the message of the amended commit. .sp It is not possible to amend public changesets (see \%\fBhg help phases\fP\:) or changesets that have children. .sp See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. .sp Returns 0 on success, 1 if nothing changed. .sp Examples: .INDENT 0.0 .IP \(bu 2 . commit all files ending in .py: .sp .nf .ft C hg commit \-\-include "set:**.py" .ft P .fi .IP \(bu 2 . commit all non\-binary files: .sp .nf .ft C hg commit \-\-exclude "set:binary()" .ft P .fi .IP \(bu 2 . amend the current commit and set the date to now: .sp .nf .ft C hg commit \-\-amend \-\-date now .ft P .fi .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \-A, \-\-addremove . mark new/missing files as added/removed before committing .TP .B \-\-close\-branch . mark a branch head as closed .TP .B \-\-amend . amend the parent of the working directory .TP .B \-s, \-\-secret . use the secret phase for committing .TP .B \-\-draft . use the draft phase for committing .TP .B \-e, \-\-edit . invoke editor on commit messages .TP .B \-\-force\-close\-branch . forcibly close branch from a non\-head changeset (ADVANCED) .TP .B \-i, \-\-interactive . use interactive mode .TP .BI \-I, \-\-include \ . include names matching the given patterns .TP .BI \-X, \-\-exclude \ . exclude names matching the given patterns .TP .BI \-m, \-\-message \ . use text as commit message .TP .BI \-l, \-\-logfile \ . read commit message from file .TP .BI \-d, \-\-date \ . record the specified date as commit date .TP .BI \-u, \-\-user \ . record the specified user as committer .TP .B \-S, \-\-subrepos . recurse into subrepositories .UNINDENT .sp [+] marked option can be specified multiple times .SH ALIASES .sp .nf .ft C ci .ft P .fi .\" Generated by docutils manpage writer. .\" .