hg-add

schedules files to be added to the repository on the next commit

TLDR

Add a specific file
$ hg add [file]
Add all new files
$ hg add
Add files by pattern
$ hg add '*.py'
Add files in directory
$ hg add [path/to/directory]
Dry run to preview
$ hg add -n [file]

SYNOPSIS

hg add [options] [files...]

DESCRIPTION

hg add schedules files to be added to the repository on the next commit. Without arguments, it adds all new files in the working directory. Use a .hgignore file to exclude files from version control. Added files appear with 'A' status in hg status until committed.

PARAMETERS

-n, --dry-run

Show what would be added without modifying state.
-I, --include PATTERN
Add only files matching the pattern (repeatable).
-X, --exclude PATTERN
Skip files matching the pattern (repeatable).
-S, --subrepos
Recurse into subrepositories.

INSTALL

sudo apt install mercurial
sudo dnf install mercurial
sudo pacman -S mercurial
sudo apk add mercurial
sudo zypper install mercurial
brew install mercurial
nix profile install nixpkgs#mercurial

SEE ALSO

hg(1), hg-commit(1), hg-status(1)