Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn ignore without deleting files?

Tags:

svn

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?

like image 223
kristian nissen Avatar asked Jun 04 '09 14:06

kristian nissen


People also ask

How do I ignore a folder in svn?

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.

What is ignore list in svn?

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.

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.


1 Answers

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.

like image 78
NeilInglis Avatar answered Sep 28 '22 10:09

NeilInglis