简体   繁体   English

使用TortoiseSVN时,从提交中排除Eclipse隐藏的“.settings”目录

[英]Exclude Eclipse's hidden '.settings' directory from commits when using TortoiseSVN

I'm using the TortoiseSVN client and Eclipse. 我正在使用TortoiseSVN客户端和Eclipse。 When I attempt to commit an Eclipse project, TortoiseSVN displays a .settings directory in the file list and says that it is un-versioned. 当我尝试提交Eclipse项目时,TortoiseSVN在文件列表中显示一个.settings目录,并说它没有版本化。 The `.settings' directory seems to be where Eclipse keeps all of its settings for a project. `.settings'目录似乎是Eclipse保留项目的所有设置的地方。

Is there a way to exclude this directory so that it is completely ignored by TortoiseSVN for this and any other Eclipse projects? 有没有办法排除这个目录,以便TortoiseSVN完全忽略它和任何其他Eclipse项目?

Since you want to ignore this folder globally, you should use…a global ignore! 由于您想要全局忽略此文件夹,您应该使用...全局忽略!

Take a look at the file 看看文件

%APPDATA%\Subversion\config

and uncomment the global-ignores line and add .settings to it. 并取消注释global-ignores行并为其添加.settings


Sample 样品

Sample full path for the file config : 文件config示例完整路径:

C:\Documents and Settings\pmn\Application Data\Subversion\config

Sample new content of the global-ignores line: global-ignores行的新内容示例:

global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store .settings

You can exclude directories like this by right clicking on them in Windows and going to TortoiseSVN/"Delete and add to ignore list" and then specifying it in the sub-menu: 您可以通过在Windows中右键单击这些目录并转到TortoiseSVN /“删除并添加到忽略列表”然后在子菜单中指定它来排除这样的目录:

在此输入图像描述

This is really easy to do, I have to do it quite often. 这很容易做到,我必须经常这样做。

您可以在“窗口” - >“首选项” - >“团队” - >“忽略的资源”下指定要忽略的资源。

If you're using Eclipse you might want to try out subClipse, it's a free subversion plugin for eclipse and it will allow you to exclude the .setings folder. 如果你正在使用Eclipse,你可能想尝试使用subClipse,它是eclipse的免费subversion插件,它允许你排除.setings文件夹。 See this link . 看到这个链接

However, are you sure you don't want these to be comitted? 但是,你确定你不想要这些吗? Since your project is build in Eclipse, one could say that the setings are a part of your project. 由于您的项目是在Eclipse中构建的,因此可以说setings是项目的一部分。

Personally I like to commit these files as they allow me to keep the same settings for every project on every location and for every developer. 我个人喜欢提交这些文件,因为它们允许我为每个位置和每个开发人员的每个项目保留相同的设置。

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

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