commands.sh

hg add

all

Adds specified files to the staging area for the next commit in Mercurial.

More info →

Options (4)

-I, --includeboolean

Add all unstaged files matching a specified pattern

Example: hg add {{[-I|--include]}} {{pattern}}
-X, --excludeboolean

Add all unstaged files, excluding those that match a specified pattern

Example: hg add {{[-X|--exclude]}} {{pattern}}
-S, --subreposboolean

Recursively add sub-repositories

Example: hg add {{[-S|--subrepos]}}
-n, --dry-runboolean

Perform a test-run without performing any actions

Example: hg add {{[-n|--dry-run]}}

Examples (5)

Add files or directories to the staging area

hg add path/to/file

Add all unstaged files matching a specified pattern

hg add [-I|--include] pattern

Add all unstaged files, excluding those that match a specified pattern

hg add [-X|--exclude] pattern

Recursively add sub-repositories

hg add [-S|--subrepos]

Perform a test-run without performing any actions

hg add [-n|--dry-run]
made by @shridhargupta | data from tldr-pages