Help: add

hg add [OPTION]... [FILE]...

add the specified files on the next commit

Schedule files to be version controlled and added to the repository.

The files will be added to the repository at the next commit. To undo an add before that, see 'hg forget'.

If no names are given, add all files to the repository (except files matching ".hgignore").


  • New (unknown) files are added automatically by 'hg add':
    $ ls
    $ hg status
    ? foo.c
    $ hg add
    adding foo.c
    $ hg status
    A foo.c
  • Specific files to be added can be specified:
    $ ls
    bar.c  foo.c
    $ hg status
    ? bar.c
    ? foo.c
    $ hg add bar.c
    $ hg status
    A bar.c
    ? foo.c

Returns 0 if all files are successfully added.

options ([+] can be repeated):

-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-S --subrepos recurse into subrepositories
-n --dry-run do not perform actions, just print output

global options ([+] can be repeated):

-R --repository REPO repository root directory or name of overlay bundle file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice for all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or debug)
--config CONFIG [+] set/override config option (use '')
--debug enable debugging output
--debugger start debugger
--encoding ENCODE set the charset encoding (default: UTF-8)
--encodingmode MODE set the charset encoding mode (default: strict)
--traceback always print a traceback on exception
--time time how long the command takes
--profile print command execution profile
--version output version information and exit
-h --help display help and exit
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never) (default: auto)
vOm#I_fOűlŷ[w)Eɶ-d@{$ɾ{{GF3==OLAx]8 !C >m88B@qaZ*bq/k*.e{(뺩y_JyߞGw7qmaGAd l6ZX1A2`v~ 6cT}ÙGioqPƆ(<ʘƭbΈ7R}6JYZ8Mrt1:z㺻668_Xڷ/A9Ы<|"C(EA`VT^Rns%#<ǑϬjArH-ghtf㥔>,_;5ÜIzYIt@ԾorhR+vݳ(=w;oA&* 4"׎>bNWLER9P)Y.4Ou`=9N,OU , UIe5MChDPtE=k#wʸ1"͛|8-O_}wЌGlPbX"_NIsvj'Ft}AiDłOwթJwCI8&UƓ*ȍȏ%GBw:H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