This sounds like a look-up-in-the-manual question to me, but I can't find it. Suppose we have a repository with files and directories in it that shouldn't be under version control but rather should be on the ignore list (such as Eclipse files
.project, generated documentation files – things that should never have been added and committed in the first place). What is the best way of deleting these files from the repository and moving them straight onto the ignore list?
The accepted answer below details a good way of setting up your local subversion repositories to avoid the problem described above. However, if you still have to solve this, it seems that you have to do some manual fiddling to get files/folders out of the repository and onto the ignore list.
For instance, for the
.settings folder, first add this to the global ignores list and then run the following command:
cp -r "$REMOVE" /tmp/ && \
svn rm "$REMOVE" && \
svn commit -m "Moving to ignore list" "$REMOVE" && \
mv "/tmp/$REMOVE" .
This copies the file/folder to a temporary location and then removes it from SVN and commits the remove – finally the file/folder is copied back, but as it is now on the ignore list it will be ignored by SVN.