hg-add

hg-add

TLDR

Add files or directories to the staging area

$ hg add [path/to/file]
copy


Add all unstaged files matching a specified pattern
$ hg add --include [pattern]
copy


Add all unstaged files, excluding those that match a specified pattern
$ hg add --exclude [pattern]
copy


Recursively add sub-repositories
$ hg add --subrepos
copy


Perform a test-run without performing any actions
$ hg add --dry-run
copy

Copied to clipboard