Debian Codegraph @

doc/man/hg-commit.1

raw
1 .TH HG COMMIT "" "" ""
2 .SH NAME
3 hg commit \- commit the specified files or all outstanding changes
4 .\" Man page generated from reStructuredText.
5 .
6 .SH SYNOPSIS
7 .sp
8 .nf
9 .ft C
10 hg commit [OPTION]... [FILE]...
11 .ft P
12 .fi
13 .SH DESCRIPTION
14 .sp
15 Commit changes to the given files into the repository. Unlike a
16 centralized SCM, this operation is a local operation. See
17 \%\fBhg push\fP\: for a way to actively distribute your changes.
18 .sp
19 If a list of files is omitted, all changes reported by \%\fBhg status\fP\:
20 will be committed.
21 .sp
22 If you are committing the result of a merge, do not provide any
23 filenames or \-I/\-X filters.
24 .sp
25 If no commit message is specified, Mercurial starts your
26 configured editor where you can enter a message. In case your
27 commit fails, you will find a backup of your message in
28 \fB.hg/last\-message.txt\fP.
29 .sp
30 The \-\-close\-branch flag can be used to mark the current branch
31 head closed. When all heads of a branch are closed, the branch
32 will be considered closed and no longer listed.
33 .sp
34 The \-\-amend flag can be used to amend the parent of the
35 working directory with a new commit that contains the changes
36 in the parent in addition to those currently reported by \%\fBhg status\fP\:,
37 if there are any. The old commit is stored in a backup bundle in
38 \fB.hg/strip\-backup\fP (see \%\fBhg help bundle\fP\: and \%\fBhg help unbundle\fP\:
39 on how to restore it).
40 .sp
41 Message, user and date are taken from the amended commit unless
42 specified. When a message isn\(aqt specified on the command line,
43 the editor will open with the message of the amended commit.
44 .sp
45 It is not possible to amend public changesets (see \%\fBhg help phases\fP\:)
46 or changesets that have children.
47 .sp
48 See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
49 .sp
50 Returns 0 on success, 1 if nothing changed.
51 .sp
52 Examples:
53 .INDENT 0.0
54 .IP \(bu 2
55 .
56 commit all files ending in .py:
57 .sp
58 .nf
59 .ft C
60 hg commit \-\-include "set:**.py"
61 .ft P
62 .fi
63 .IP \(bu 2
64 .
65 commit all non\-binary files:
66 .sp
67 .nf
68 .ft C
69 hg commit \-\-exclude "set:binary()"
70 .ft P
71 .fi
72 .IP \(bu 2
73 .
74 amend the current commit and set the date to now:
75 .sp
76 .nf
77 .ft C
78 hg commit \-\-amend \-\-date now
79 .ft P
80 .fi
81 .UNINDENT
82 .SH OPTIONS
83 .INDENT 0.0
84 .TP
85 .B \-A, \-\-addremove
86 .
87 mark new/missing files as added/removed before committing
88 .TP
89 .B \-\-close\-branch
90 .
91 mark a branch head as closed
92 .TP
93 .B \-\-amend
94 .
95 amend the parent of the working directory
96 .TP
97 .B \-s, \-\-secret
98 .
99 use the secret phase for committing
100 .TP
101 .B \-\-draft
102 .
103 use the draft phase for committing
104 .TP
105 .B \-e, \-\-edit
106 .
107 invoke editor on commit messages
108 .TP
109 .B \-\-force\-close\-branch
110 .
111 forcibly close branch from a non\-head changeset (ADVANCED)
112 .TP
113 .B \-i, \-\-interactive
114 .
115 use interactive mode
116 .TP
117 .BI \-I, \-\-include \ <PATTERN[+]>
118 .
119 include names matching the given patterns
120 .TP
121 .BI \-X, \-\-exclude \ <PATTERN[+]>
122 .
123 exclude names matching the given patterns
124 .TP
125 .BI \-m, \-\-message \ <TEXT>
126 .
127 use text as commit message
128 .TP
129 .BI \-l, \-\-logfile \ <FILE>
130 .
131 read commit message from file
132 .TP
133 .BI \-d, \-\-date \ <DATE>
134 .
135 record the specified date as commit date
136 .TP
137 .BI \-u, \-\-user \ <USER>
138 .
139 record the specified user as committer
140 .TP
141 .B \-S, \-\-subrepos
142 .
143 recurse into subrepositories
144 .UNINDENT
145 .sp
146 [+] marked option can be specified multiple times
147 .SH ALIASES
148 .sp
149 .nf
150 .ft C
151 ci
152 .ft P
153 .fi
154 .\" Generated by docutils manpage writer.
155 .\"
156 .