hg-仅忽略根目录 [英] hg - Ignore directory at root only

查看:92
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆