开发者

How to hgignore all subfolders but not the file in a folder?

I am looking to use n开发者_JAVA技巧uget without committing the packages. I want to ignore in mercurial all packages subfolder that are located in the /packages/ folder, but I do not want to exclude the repositories.config file located in the /packages/ folder.

How should I write the exclusion regex to do that?


Can't you just do this:

hg add packages/repositories.config

And then have this in your .hgignore file

syntax: glob

packages

?


syntax: regexp
packages/(?!repositories.config).*

[source]


For ignore all jpg files with subdirectories in folder images:

^images/.*\.jpg$
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜