How to "unversion" a file in either svn and/or git

In Git, in order to delete it from the tree, but NOT from the working directory, which I think is what you want, you can use the --cached flag, that is:

git rm --cached <filename>

SVN version 1.5 supports removing/deleting a file from a repository with out losing the local file

taken from http://subversion.tigris.org/svn_1.5_releasenotes.html

New --keep-local option retains path after delete..

Delete (remove) now takes a --keep-local option to retain its targets locally, so paths will not be removed even if unmodified.


If you accidentally 'add' a file in svn & you haven't committed it, you can revert that file & it will remove the add.