Winston
Winston

Reputation: 1428

Subversion: Ignore some files

I have code checkin with subversion. Now I put the configuration file in the repository as well.

I would like to avoid updating the configuration file with the command 'svn up' command. How would I set the SVN properties?

Thanks in advance

Upvotes: 0

Views: 232

Answers (2)

Michael Sorens
Michael Sorens

Reputation: 36748

The svn:ignore property is what you use to ignore adding files into the repository. And since they would not be added, they would also not be updated when you do an svn update. But svn:ignore does not apply once you have added a file to your repository, as you stated you have done.

One common practice when you wish to keep a base or template version of a user-specific file in the repository is to store it under a derived name and add it to your repository, e.g. instead of app.config you might name it app.config.template. Updates to that file--which you would do only occasionally and always explicitly--would then be retrieved normally by an svn update. Each user, then, starts with that template and renames it locally to the "real" name app.config. And it is then each user's responsibility to merge any changes that may occur in the template if and when they occur (which again, would typically be infrequent).

(Do make sure you have the real name--app.config in this example--included in the svn:ignore property for its containing directory!)

Upvotes: 1

Brian Ogden
Brian Ogden

Reputation: 19232

I recommend TortoiseSvn, unless you really prefer cmd line. Once installed, you can connect to your repository and make all the property changes you want.

Upvotes: 0

Related Questions