svn:忽略 subclipse/TortoiseSVN 中的子目录
如何全局忽略基于目录模式的整个子树,而不为每个项目专门排除它?例如,我想排除所有 Maven 项目中的目标/树,而不必在每个项目的基础上单独执行此操作。
将“目标”添加到窗口>首选项>团队>忽略的资源效果很好,但也会排除任何目标目录。其他地方 - 这对我来说不是问题,但我想知道是否有更好的方法来指定排除某些目录。
我还添加了 Tortoise 设置的排除模式,并且我刚刚尝试在此处找到答案时意识到了 subversion global-ignores 属性:)仅供参考,我确实知道在哪里将模式,但不确定它应该是什么。
How do I ignore an entire subtree based on a directory pattern globally, without specifically excluding it for every project? For an example, I would like to exclude the target/ tree in all Maven projects without having to do so individually on a per-project basis.
Adding 'target' to Window > Preferences > Team > Ignored Resources works well, but will also exclude any target dir. elsewhere - which isn't a problem in my case, but I wanted to know if there is a better method to specify excluding certain dirs.
I have also added the exclusion pattern for Tortoise settings, and am aware of the subversion global-ignores property from trying to find the answer here just now :) Just an fyi that I do know where to put the pattern, but not sure of what it should be.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关于忽略模式,TortoiseSVN 帮助说:
您不应在模式中包含路径信息。模式匹配旨在针对平面文件名和文件夹名称使用。 ....如果您想忽略 prog 文件夹中而不是 doc 文件夹中存在的所有 tmp 文件夹,您应该使用 svn:ignore。 没有可靠的方法可以使用全局忽略模式来实现此目的。
看来你唯一的选择是 svn:ignore 属性。
Regarding ignore patterns, TortoiseSVN help says:
You should not include path information in your pattern. The pattern matching is intended for use against planes filenames and folder names. ... . If you want to ignore all tmp folders that exist within a prog folder and not within a doc folder you should use the svn:ignore. There is no reliable way to achieve this using global ignore patterns.
It seems your only option is svn:ignore property.
当您创建新的 Maven 项目时,请记住svn:ignore target 文件夹。这才是最强的办法。
PS:如果你为 target 构建一个模式,你将匹配所有包含几乎 target 的单词...
When you create a new Maven Project, remember to svn:ignore the target folder. That is the strongest way.
Ps : if you construct a pattern for target, you will match all word containing almost target...