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?
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.
You could add bin folder to ignore list. Right click on the bin folder -> TortoiseSVN -> Unversion and add to ignore list -> bin.
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 .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With