Questions
I have two problems with SVN:IGNORE in Eclipse
(1) Sometimes the "Add to SVN:Ignore" context menu option is grayed out, so i have no idea why i can t add a folder to SVN ignore.
I have some IDE specific rubbish for example "/.idea" or ".settings", with a + symbol, so it is not yet in SVN. So why is the Svn:ignore option greyed out then?
(2)
When Eclipse does give me the option to ignore something, I am presented with three options.
- Resources by Name. But it doesnt give me any indication of WHICH resources I want to ignore.
- Wildcard extension. Again it gives me no indication of what my wildcard is.
- Custom pattern. Here I can I guess specify patterns such as *.idea and *.settings.
Answers
The files or folders in question have already been added to SVN.
Please note that you can have added files that are not yet committed (represented by the blue plus sign you see).
The options you have for ignoring files are the ones you described, every file matching this criteria can no longer be added to SVN.
So in a nutshell:
- Adding a file to svn:ignore will prevent it from being added to the
repository
- Once a file has been added to SVN it can no longer be
ignored until the add is reverted
- Once a file has been committed to SVN it can no longer be ignored
until the file is deleted from the repository
Citing from the Subclipse manual pages your ignore options are:
To ignore specific resources, select the file(s) and/or folder(s) you wish to ignore, and choose Add to svn:ignore in the Team menu. This will bring up a selection where you may choose how to ignore the file:
- By name (only the selected resource)
- By wildcard extension (based on the selected resources)
- By a custom pattern that you enter (e.g. log*.txt)
When in doubt, choose the first option, Resource(s) by name, since that will never ignore a resource that wasn t explicitly selected.
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/15111082/how-does-svnignore-work-in-eclipse
Related