简体   繁体   English

我该如何做一个反向SVN忽略

[英]How can I do a reversed svn ignore

I have a repository with lots of good stuff in it. 我有一个包含很多好东西的存储库。 I want to keep all of that stuff in the repo, but I want to ignore a few files and folders when retrieving. 我想将所有这些东西保留在存储库中,但是我想在检索时忽略一些文件和文件夹。

The way I understand ignoring files and folders with svn is that it will ignore my local files, so they don't get checked in. I want the opposite. 我了解使用svn忽略文件和文件夹的方式是它将忽略我的本地文件,因此它们不会被检入。我想要相反的操作。 I want to ignore some of the files that are allready in the repository. 我想忽略存储库中所有已经准备好的文件。

Why? 为什么? Cause our build process makes use of certain files, but for debugging we use other files, and I don't want to confuse my IDE by having several versions of our library. 因为我们的构建过程使用了某些文件,但是为了进行调试,我们使用了其他文件,并且我不想因为拥有多个版本的库而混淆了我的IDE。

With svn you can choose to check out only certain subfolders instead of the whole project, but other than that you don't have much control over selectively checking out just certain files. 使用svn,您可以选择仅检出某些子文件夹而不检出整个项目,但是除此之外,您对选择检出某些文件没有太多控制权。 You're correct that setting the ignore property is intended more to avoid having local files checked in, especially things like log files, build artifacts and other 'temporary' or routinely regenerated files. 您是正确的,设置ignore属性是为了避免签入本地文件,尤其是日志文件,构建工件以及其他“临时”或常规重新生成的文件。

I think you might need to find a different approach to managing these files, possibly better use of your IDE or switching IDE's entirely. 我认为您可能需要找到一种不同的方法来管理这些文件,可能会更好地使用IDE或完全切换IDE。 This isn't the class of problem that source control software is designed to solve. 这不是源代码控制软件旨在解决的问题。

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

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