浏览代码

hg-add: add page (#1789)

Owen Voke 7 年之前
父节点
当前提交
fcd411eafc
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 23 0
      pages/common/hg-add.md
  2. 1 0
      pages/common/hg.md

+ 23 - 0
pages/common/hg-add.md

@@ -0,0 +1,23 @@
+# 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`

+ 1 - 0
pages/common/hg.md

@@ -1,6 +1,7 @@
 # hg
 
 > A command line interface for Mercurial, a distributed source control management system.
+> See the `hg-add` and `hg-commit` pages for additional information.
 
 - Execute Mercurial command: