How to exclude file from synchronizations with svn repo in Subclipse?
Asked Answered
S

2

9

I want to exclude a file (.properties) in my project in Eclipse from being checked during synchronization with the svn repo. If I make a change in this .properties file in my Eclipse project, its icon will be marked indicating that the project is not synchronized with the repo. How can I avoid this?

I don't want to exclude this file from the repo, because from time to time I will commit a new version.

Spier answered 10/2, 2011 at 23:8 Comment(0)
W
9

Go to Window->Preferences->Team->Ignored Resources and add your pattern there. This way you bypass the "svn:ignore button disabled" problem and you get to fill in your own pattern, not only the files that you select.

In your case you should add .properties as a pattern. It will idefntify all the files with that name and ignore them, even if they are already in the repository. But, you should also delete them in from the svn if you've already commited them.

Whilst answered 11/4, 2013 at 9:55 Comment(1)
plus one: helpful for unversioned filesPedicel
M
4

Do this:-

Right click on the file you want to exclude -> Team -> Add to svn:ignore

By the way, when you make a change to a file, it is SUPPOSED to say it is not synchronized with the repo. That's totally fine. If you exclude this file from the repo, then you will not have any versioning applied to this particular file, which kind of defeats the purpose of using a version control in the first place. In another word, if you accidentally delete this file or mess up this file, you cannot get a copy from the repo. Just make sure this is what you want before you do the above step.

Mothy answered 10/2, 2011 at 23:47 Comment(2)
position in menu "Add to svn:ignore" is disabled (grey color)Spier
you cannot ignore a file that's already in the repo. Delete that file from the repo. Then try it again.Mothy

© 2022 - 2024 — McMap. All rights reserved.