1

I want to ignore all except a few folders and files.

I saw examples with regexp. But I don't understand well the regexp and there is different implementations of the regexp. So, I'm not sure that it will always work correctly.

Is there a way to invert a glob expressions?

In node-glob I could write:

!(pattern|pattern|pattern) Matches anything that does not match any of the patterns provided.

But it doesn't work for Mercurial.

Denis535
  • 3,407
  • 4
  • 25
  • 36
  • If you "don't understand well the regexp" - YOU FAIL, because strong understanding of regexo-ing **is a must** – Lazy Badger May 14 '16 at 11:12
  • Possible duplicate of [hgignore: help ignoring all files but certain ones](http://stackoverflow.com/questions/1512058/hgignore-help-ignoring-all-files-but-certain-ones) – Lazy Badger May 14 '16 at 11:13
  • Put `syntax: regexp` at the top of your `.hgignore`, and you'll be able to use standard, full-powered regular expressions. (Then see the other question for what you could use.) – alexis May 14 '16 at 22:55

0 Answers0