简体   繁体   中英

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

I'm using the TortoiseSVN client and 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. The `.settings' directory seems to be where Eclipse keeps all of its settings for a project.

Is there a way to exclude this directory so that it is completely ignored by TortoiseSVN for this and any other Eclipse projects?

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.


Sample

Sample full path for the file config :

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

Sample new content of the global-ignores line:

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:

在此输入图像描述

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. 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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