0

在 Hg 中,如果已经跟踪了某些子目录和包含的文件,如何递归地忽略目录?我想将它们保存在我的文件系统中,但不要对它们进行版本控制。我不想从文件系统中删除目录。

4

1 回答 1

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
于 2012-09-06T00:22:48.833 回答