Accepted answer

you can't svn:ignore a file that is already commited to repository.

so you must:

  1. delete the file from the repository.
  2. update your project (the working copy) to the head revision.
  3. recreate the file in eclipse.
  4. set svn:ignore on the file via team->add to svn:ignore.
  5. restart eclipse to reflect changes.

good luck!


this is quite frustrating, but it's a containment issue (the .svn folders keep track also of ignored files). any item that needs to be ignored is to be added to the ignore list of the immediate parent folder.

so, i had a new sub-folder with a new file in it and wanted to ignore that file but i couldn't do it because the option was grayed out. i solved it by committing the new folder first, which i wanted to (it was a cache folder), and then adding that file to the ignore list (of the newly added folder ;-), having the chance to add a pattern instead of a single file.


one more thing... if you already ignored those files through eclipse (with team -> ignored resources) you have to undo these settings so the files are controlled by subclipse again and "add to svn:ignore" option reappears


in case you're using tortoisesvn and the file is already commited, go to your files project folder, right click on the file/folder you want to ignore, tortoisesvn -> unversion and add to ignore list. then you delete the folder/file (click on it and then push delete on your keyboard), right click on your project folder, -> svn commit... this will delete the folder from the repository.... now you can create your folder/file again and then it will be ignored.


to ignore certain files or turn off ignoring you can use the eclipse preferences-->team -->ignored resource. check or uncheck the resources you want to be tracked.


i just figured out how to do this:

it appears that when you add a parent folder to version control, eclipse adds all sub-folders. once the sub-folders are added to version control, it is not possible to ignore them.

here's how to do it:

right click on the top level folder and add to version control right click on the child folder you want to ignore, revert right click on the child folder you want to ignore, svn:ignore (which will now be available)


this is just a wag as i am not a subclipse user, but have you ensured that the folders containing what you're trying to ignore have themselves been added to svn? you can't svn:ignore something inside a folder that's not under version control.


what worked for me was following : (eclipse 3.3.6 subclipse 2.4)

  • set svn:ignore property via tortoise : ( .settings .classpath .project target .apt_src one item at one line)
  • deleted the project from the eclipse
  • fresh checkout from the svn
  • import the project in eclipse (simple reimporting the project in eclipse did not worked for me)


working with subclipse on eclipse indigo service release 2

i had commited folders with temporary files and logs lying under /src to the svn repository. and after realizing it, i found myself in the same situation with a grayed out "svn:ignore"

i found following solution:

1. i deleted the folder from my project source

2. team -> commit... withouth the folder

3. recreated the folder back into the project tree

now i was able to use "team -> add to svn:ignore..."


if you are trying to share a project in svn with eclipse for the first time, you might want to avoid certain files to be commited. in order to do so, go to preferences->team->ignored resources. in this screen you just need to add a pattern to ignore the kind of files you don't want to commit.

eclipse preferences


it seems subclipse only allows you to add a top-level folder to ignore list and not any sub folders under it. not sure why it works this way. however, i found out by trial and error that if you directly add a sub-folder to version control, then it will allow you to add another folder at the same level to the ignore list.

alt text

for example, refer fig above, when i wanted to ignore the webapp folder without adding src, subclipse was not allowing me to do so. but when i added the java folder to version control, the "add to svn:ignore..." was enabled for webapp.


i was able to do this using tortoisesvn directly from windows explorer:

right click on file to ignore->tortisesvn->delete and add to ignore list

i had to close then re-open the project in eclipse, job done :)

Related Query

More Query from same tag