hg-仅忽略根目录 [英] hg - Ignore directory at root only
本文介绍了hg-仅忽略根目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在项目的.hgignore
中,我要排除/static/
(即目录根目录中的静态文件夹),而不要排除/templates/static/
.我将如何配置.hgignore
来允许此操作?
In my project's .hgignore
, I want to exclude /static/
(i.e., the static folder at the root of the directory), but not /templates/static/
. How would I configure .hgignore
to allow this?
推荐答案
您可以在.hgignore的开头包含syntax: regexp
,然后使用^
使用perl regex语法来根目录.因此,只需^static
即可完成工作.
You can include syntax: regexp
at the beginning of .hgignore and then use perl regex syntax to root a directory by using ^
. So just ^static
should do the work.
这篇关于hg-仅忽略根目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文