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
trademarks
Follow If Not True Then False Updates!
  1. YUM Remove Repo (Repository) – YUM Disable Repo (Repository)
  2. Delete files securely on Linux – Journaled file systems
  3. Install SVN (Subversion) Server on Fedora 16/15, CentOS/Red Hat (RHEL) 6/5.7
  4. Delete files permanently with shred command in Linux – Remove absolutely
  5. YUM Query Available Packages From Specific Repository on Fedora, CentOS, Red Hat

Leave a Comment

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Bear