| 1 |
.TH HG ADD "" "" "" |
| 2 |
.SH NAME |
| 3 |
hg add \- add the specified files on the next commit |
| 4 |
.\" Man page generated from reStructuredText. |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.sp |
| 8 |
.nf |
| 9 |
.ft C |
| 10 |
hg add [OPTION]... [FILE]... |
| 11 |
.ft P |
| 12 |
.fi |
| 13 |
.SH DESCRIPTION |
| 14 |
.sp |
| 15 |
Schedule files to be version controlled and added to the |
| 16 |
repository. |
| 17 |
.sp |
| 18 |
The files will be added to the repository at the next commit. To |
| 19 |
undo an add before that, see \%\fBhg forget\fP\:. |
| 20 |
.sp |
| 21 |
If no names are given, add all files to the repository (except |
| 22 |
files matching \fB.hgignore\fP). |
| 23 |
.sp |
| 24 |
Examples: |
| 25 |
.INDENT 0.0 |
| 26 |
.INDENT 3.5 |
| 27 |
.INDENT 0.0 |
| 28 |
.IP \(bu 2 |
| 29 |
. |
| 30 |
New (unknown) files are added |
| 31 |
automatically by \%\fBhg add\fP\:: |
| 32 |
.sp |
| 33 |
.nf |
| 34 |
.ft C |
| 35 |
$ ls |
| 36 |
foo.c |
| 37 |
$ hg status |
| 38 |
? foo.c |
| 39 |
$ hg add |
| 40 |
adding foo.c |
| 41 |
$ hg status |
| 42 |
A foo.c |
| 43 |
.ft P |
| 44 |
.fi |
| 45 |
.IP \(bu 2 |
| 46 |
. |
| 47 |
Specific files to be added can be specified: |
| 48 |
.sp |
| 49 |
.nf |
| 50 |
.ft C |
| 51 |
$ ls |
| 52 |
bar.c foo.c |
| 53 |
$ hg status |
| 54 |
? bar.c |
| 55 |
? foo.c |
| 56 |
$ hg add bar.c |
| 57 |
$ hg status |
| 58 |
A bar.c |
| 59 |
? foo.c |
| 60 |
.ft P |
| 61 |
.fi |
| 62 |
.UNINDENT |
| 63 |
.UNINDENT |
| 64 |
.UNINDENT |
| 65 |
.sp |
| 66 |
Returns 0 if all files are successfully added. |
| 67 |
.SH OPTIONS |
| 68 |
.INDENT 0.0 |
| 69 |
.TP |
| 70 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 71 |
. |
| 72 |
include names matching the given patterns |
| 73 |
.TP |
| 74 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 75 |
. |
| 76 |
exclude names matching the given patterns |
| 77 |
.TP |
| 78 |
.B \-S, \-\-subrepos |
| 79 |
. |
| 80 |
recurse into subrepositories |
| 81 |
.TP |
| 82 |
.B \-n, \-\-dry\-run |
| 83 |
. |
| 84 |
do not perform actions, just print output |
| 85 |
.UNINDENT |
| 86 |
.sp |
| 87 |
[+] marked option can be specified multiple times |
| 88 |
.\" Generated by docutils manpage writer. |
| 89 |
.\" |
| 90 |
. |