I want to ignore all directories "_notes" throughout a repository. _notes is generated by dreamweaver and is not part of the project itself, but these directories are scattered throughout the project.
Somehow ^_notes$ is not doing the job in .hgignore ... Do I have to direct .hgignore to each and every directory "_notes" or does it do it recursively?
I am not quite sure about the man pages
Try:
syntax: glob
_notes/*
I should probably mention that if the directories have already been added you cannot ignore them. Use hg forget if you are on a newer Mercurial version, be this the case.
syntax: glob
_notes
This isn't specific to directories, so if you have any files with that exact name, they will be ignored too.
Example:
$ hg init subu && cd subu
$ mkdir _notes
$ mkdir a && mkdir a/_notes
$ echo 'syntax: glob' >>.hgignore
$ echo '_notes' >>.hgignore
$ touch file.txt
$ touch _notes/file.txt
$ touch a/file.txt
$ touch a/_notes/file.txt
$ hg st -A
? .hgignore
? a/file.txt
? file.txt
I _notes/file.txt
I a/_notes/file.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With