...

SVN Remove Added File From Repository and Keep Local File – Subversion

svn-remove-added-file-from-repository-and-keep-local-file-subversion

This is quick SVN (Subversion) tip, howto remove added file from SVN repository without deleting file from local filesystem.

Remove File From SVN Repository and Keep Local File


svn delete --keep-local path/to/file.example

Real example:


svn delete --keep-local css/test.css

Real world usage example
Adding a whole directory add a file that was not intended to SVN reads, but should be retained locally.


svn add css/
A css
A css/testing_styles.css
A css/style.css

style.css is OK, but testing_styles.css should not be commited, but it should be kept on locally. Simply remove it from svn but keep it locally:


svn delete --keep-local css/testing_styles.css
D css/testing_styles.css

File is deleted from SVN repository, but kept locally:


svn status
A css
? css/testing_styles.css
A css/style.css

Discover more from WIREDGORILLA

Subscribe now to keep reading and get access to the full archive.

Continue reading