简体   繁体   English

SVN - 如何为整个存储库/团队设置忽略模式?

[英]SVN - How can I set an ignore pattern for an entire repository/team?

Is there a way to set an ignore pattern for the whole repository, or check in an ignore file along with the code itself? 有没有办法为整个存储库设置忽略模式,或者检查忽略文件以及代码本身?

Otherwise, all devs current and future have to synchronize their ignore patterns via email, and there's always people that don't do it. 否则,所有开发者当前和未来都必须通过电子邮件同步他们的忽略模式,并且总是有人不这样做。

Edit as a response to AI G's answer below. 编辑为对AI G的回答如下。

And it's worth noting again that, unlike the global-ignores option, the patterns found in the svn:ignore property apply only to the directory on which that property is set, and not to any of its subdirectories. 值得注意的是,与global-ignores选项不同,svn:ignore属性中的模式仅适用于设置该属性的目录,而不适用于其任何子目录。 The svn:ignore property is a good way to tell Subversion to ignore files that are likely to be present in every user's working copy of that directory, such as compiler output ... svn:ignore属性是告诉Subversion忽略可能存在于该目录的每个用户的工作副本中的文件的好方法,例如编译器输出......

Subversion 1.8 provides a more powerful version of the svn:ignore property, the svn:global-ignores property. Subversion 1.8提供了更强大的svn:ignore属性版本,即svn:global-ignores属性。 Like the svn:ignore property, svn:global-ignores can only be set on a directory and contains file patterns Subversion uses to determine ignorable objects.[21] 与svn:ignore属性一样,svn:global-ignores只能在目录上设置,并包含Subversion用于确定可忽略对象的文件模式。[21] These ignore patterns are also appended to any patterns defined in the global-ignores runtime configuration option together with any svn:ignore defined patterns. 这些忽略模式也会附加到global-ignores运行时配置选项中定义的任何模式以及任何svn:ignore定义的模式。 Unlike svn:ignore however, the svn:global-ignores property is inheritable [22] and applies to all paths under the directory on which the property is set, not just the immediate children of the directory. 与svn:ignore不同,svn:global-ignores属性是可继承的[22]并且适用于设置属性的目录下的所有路径,而不仅仅是目录的直接子节点。

Luke 卢克

Add the ignore pattern to the head of repository. 将忽略模式添加到存储库的头部。 Each dev will get it when they check out the repo. 每个开发人员在检查回购时都会得到它。 In v1.8 you can; 在v1.8你可以;

svn propset svn:global-ignores *.ext

Check out the docs on svn:ignore here . 查看svn上文档:忽略这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM