Reputation: 26868
In Hg, how to ignore a directory recursively if some of its subdirectories and contained files are already tracked? I'd like to keep them in my file system but don't version control them. I don't want to remove the directory from the file system.
Upvotes: 0
Views: 184
Reputation: 30453
You can use hg forget dir_name/
to stop tracking directory called dir_name
recursively.
More info on 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
Upvotes: 1