Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN: Ignore subfolders

Tags:

I have a folder say: /user_files, which I want to include in SVN, but there are additional folders underneath it which I don't want to include.

Is there a way to use svn:ignore to ignore anything in a folder even if that parent folder is included in the repos?

like image 922
Mark Steudel Avatar asked Feb 03 '11 17:02

Mark Steudel


People also ask

How do I ignore files in svn?

Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.

How do I ignore target folder in svn?

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target . svn propedit svn:ignore .

How do I commit a directory in svn?

Right-click in an empty area of the folder and select Refresh. You'll see “+” icons on the folders/files, now. Right-click an empty area in the folder once again and select SVN Commit. Add a message regarding what you are committing and click OK.


2 Answers

Use this to ignore everything in the user_files directory:

svn propset svn:ignore '*' user_files

This sets the svn:ignore property to * on the user_files directory, which effectively causes svn to ignore every untracked file in this directory.

Then you have to commit the directory on which you set the property, and update other working copies.

like image 125
Arnaud Le Blanc Avatar answered Oct 06 '22 00:10

Arnaud Le Blanc


.svnignore doesn't stop you from adding things - it just suppresses them being reported in svn stat. You could put /user_files in your .svnignore and then force-add the things you want to add from there.

like image 38
Dan Davies Brackett Avatar answered Oct 05 '22 23:10

Dan Davies Brackett