在Hg中,如果已经跟踪了某些子目录和包含的文件,如何递归地忽略目录?我想将它们保存在我的文件系统中,但不要对它们进行版本控制。我不想从文件系统中删除该目录。
答案 0 :(得分:1)
您可以使用hg forget dir_name/
以递归方式停止跟踪名为dir_name
的目录。
有关hg forget
的更多信息:
hg forget [OPTION]... FILE...
forget the specified files on the next commit
Mark the specified files so they will no longer be tracked after the next
commit.
This only removes files from the current branch, not from the entire
project history, and it does not delete them from the working directory.
To undo a forget before the next commit, see "hg add".
Examples:
- forget newly-added binary files:
hg forget "set:added() and binary()"
- forget files that would be excluded by .hgignore:
hg forget "set:hgignore()"
Returns 0 on success.
options:
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
--mq operate on patch repository