简体   繁体   中英

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

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, eg 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!)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM