Ignore files which are already versioned

If you accidentally added some files which should have been ignored, how do you get them out of version control without losing them? Maybe you have your own IDE configuration file which is not part of the project, but which took you a long time to set up just the way you like it.

If you have not yet committed the add, then all you have to do is use TortoiseSVNRevert... to undo the add. You should then add the file(s) to the ignore list so they don't get added again later by mistake.

If the files are already in the repository, you have to do a little more work.

  1. Hold the Shift key to get the extended context menu and use TortoiseSVNDelete (keep local) to mark the file/folder for deletion from the repository without losing the local copy.

  2. TortoiseSVNCommit the parent folder.

  3. Add the file/folder to the ignore list so you don't get into the same trouble again.