How do I ignore .hgignore in my local repository?
Asked Answered
C

2

14

.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?

Chung answered 23/5, 2011 at 11:30 Comment(2)
possible duplicate of hg local ignoreCanakin
The title is really misleading. OP wants to extend hgignore without putting the additional ignores into it.Algophobia
H
15

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

Humeral answered 23/5, 2011 at 11:33 Comment(0)
T
9

Ironically enough, you can also just add

syntax:glob
.hgignore

To the .hgignore file itself.

To answered 14/6, 2011 at 6:30 Comment(1)
if the rep is already tracking .hgignore you would need to forget it firstTurney

© 2022 - 2024 — McMap. All rights reserved.