简体   繁体   中英

How do I ignore .hgignore in my local repository?

.hgignore itself is version controlled. I've added some object dirs i want to ignore but i do not want to commit these changes to .hgignore. What do i do?

Add the following to the repo's .hg/hgrc :

[ui]
ignore = /path/to/repo/.hg/hgignore

and create a new file .hg/hgignore beside it. This new file will be untracked, but work the same as the versioned .hgignore file for this specific working copy. (The /path/to/repo bit is unfortunate but necessary to make it work when invoking hg from within a subdir of the repo.)

Source: Mercurial Tips and Tricks

Ironically enough, you can also just add

syntax:glob
.hgignore

To the .hgignore file itself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM