1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
.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 \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X, \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m, \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l, \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d, \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u, \-\-user \ <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.
.\"
.
|