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

nuget, svn, tortoisesvn

Solution

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

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

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

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

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

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.

Problem

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?

Original source

Related problems