.hgignore syntax for ignoring only files, not directories?

后端 未结 2 1545
自闭症患者
自闭症患者 2021-02-05 22:41

I have a problem which I can\'t seem to understand. I\'m using TortoiseHg (version 0.7.5) on Windows but on Linux I have the same problem. Here it is:

My .hgignore

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 22:53

    Here is a dirty trick:

    Create an empty file ".hidden" in your directory, than add to .hgignore:

    ^mydir/(?!\.hidden).+$
    

    This will ignore all files in the directory except ".hidden".

提交回复
热议问题