简体   繁体   English

Eclipse SVN Subversive:如何忽略所有类型*的文件

[英]Eclipse SVN Subversive: how to ignore all files of type .*

In eclipse: Preferences > Team > Ignored Resources > Add Pattern... 在eclipse中:首选项>团队>忽略的资源>添加模式...

I have added the pattern: .* 我添加了模式: .*

However when I synchronize my project with SVN I still see files like .settings , .classpath , .project ... 但是,当我将项目与SVN同步时,仍然会看到.settings.classpath.project等文件。

That's not what I would expect... what is going on here and how do I fix it? 那不是我所期望的...这里发生了什么以及如何解决?

If the files have been added to the repository already, they do not honour the Ignored resources settings. 如果文件已经添加到资源库中,则它们不支持“ Ignored resources设置。 If you really want to stop following the changes, you need to remove them from the repository - by hand. 如果您确实想停止更改,则需要手动将其从存储库中删除。 First mark them ignored in the GUI and commit the ignore changes. 首先在GUI中将其标记为已忽略,然后提交忽略更改。 Then to remove the files on Unix: 然后在Unix上删除文件:

svn checkout yourrepourl adirectory
cd adirectory
svn rm .project .settings .classpath
svn commit

Then you need to import the project again from the repository to your Eclipse workspace - updating will most probably fail, as the necessary Eclipse project metadata files were removed in the repository, but still exist in the workspace. 然后,您需要将项目再次从存储库导入到Eclipse工作区-更新很可能会失败,因为必需的Eclipse项目元数据文件已从存储库中删除,但仍存在于工作区中。 Then make sure that they are not going into the repository. 然后确保它们没有进入存储库。

In the future, make sure you do not commit any files you want to ignore - removing them later is much harder. 将来,请确保不要提交要忽略的任何文件-以后删除它们会更加困难。

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

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