Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN remove local files, retain in repository

So here's a question that I haven't seen asked.

Im using subversion 1.7

I did an "svn co" on a directory that I do not need, but cannot be removed from the repository (other people DO need it). I can delete the local copy of the directory and that is fine, but when I run "svn up" on the root up restores the deleted directory.

  /rootDir
        /folder1.      
        /unneededFolder

I can delete unneededFolder but svn keeps trying to restore it when I run update on the rootDir (rather than having to run svn up on each subdirectory). How can I tell svn to stop updating that folder in my working copy without deleting it from the repository?

like image 870
Alex Buck Avatar asked Jan 18 '23 07:01

Alex Buck


1 Answers

The easiest way to do is to use:

svn update --set-depth exclude <dir>

This will remove from your working copy, but leave it in the repository.

See documentation on Sparse Directories.

like image 71
Steven Avatar answered Jan 29 '23 08:01

Steven