Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore only subdirectories within a directory while still including a specific file with tortoisesvn

I'm using NuGet and NuGet package restore with SVN. Is there a way to ignore all package directories within the packages folder but still include the repositories.config file?

like image 576
devlife Avatar asked Jul 18 '13 20:07

devlife


People also ask

How do I set property to ignore 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 bin and obj folder in svn?

You could add bin folder to ignore list. Right click on the bin folder -> TortoiseSVN -> Unversion and add to ignore list -> bin.

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 .


1 Answers

Do not ignore the Packages directory, itself. You will need this folder to commit your repository config.

  1. Right-click the 'Packages' directory, and add it to Subversion. In the 'Add' dialog, select ONLY the Packages directory and the 'repositories.config' file.

  2. Right-click the 'Packages' directory again, and this time bring up TortoiseSVN Properties.

  3. In the Properties dialog, select New... -> Advanced.

    Properties Dialog

  4. In the Advanced dialog, set the property name to 'svn:ignore' and the value to '**'.

    enter image description here

  5. Done. Commit.

The ** ignore setting causes all files and subdirectories to be ignored. However, since repositories.config is committed, it overrides the ignore settings for just this file. The config file will be tracked, and any modifications noted.

like image 100
Jay Harris Avatar answered Dec 16 '22 04:12

Jay Harris