how can I ignore files from my svn repo without deleting them as well?
When I work on existing projects I often have to setup a local version of the project and using my local database as well. With drupal for instance, I checkout the svn repo, change the settings.php file to match my local database, but now I have to make sure I do not commit the settings file again.
Is there any clever svn command that will fix this?
Set the svn:ignore property of the parent directory: svn propset svn:ignore dirname . If you have multiple things to ignore, separate by newlines in the property value.
The big difference here is that the global ignore list is a client property. It applies to all Subversion projects, but on the client PC only. In general it is better to use the svn:ignore property where possible, because it can be applied to specific project areas, and it works for everyone who checks out the project.
You could add bin folder to ignore list. Right click on the bin folder -> TortoiseSVN -> Unversion and add to ignore list -> bin.
From the SVN Help:
I have a file in my project that every developer must change, but I don't want those local mods to ever be committed. How can I make 'svn commit' ignore the file?**
The answer is: don't put that file under version control. Instead, put a template of the file under version control, something like "file.tmpl".
Then, after the initial 'svn checkout', have your users (or your build system) do a normal OS copy of the template to the proper filename, and have users customize the copy. The file is unversioned, so it will never be committed. And if you wish, you can add the file to its parent directory's svn:ignore property, so it doesn't show up as '?' in the 'svn status' command.
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