1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 17:02:09 +02:00
tldr/pages/common/hg-add.md
2017-12-14 10:52:24 +05:30

23 lines
490 B
Markdown

# hg add
> Adds specified files to the staging area for the next commit in Mercurial.
- Add files or directories to the staging area:
`hg add {{path/to/file}}`
- Add all unstaged files matching a specified pattern:
`hg add --include {{pattern}}`
- Add all unstaged files, excluding those that match a specified pattern:
`hg add --exclude {{pattern}}`
- Recursively add sub-repositories:
`hg add --subrepos`
- Perform a test-run without performing any actions:
`hg add --dry-run`