SVN - 忽略存储库中的文件 [英] SVN - ignoring files already in repository

查看:302
本文介绍了SVN - 忽略存储库中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目中有一个配置文件,它需要在存​​储库中(所以新的开发人员在签出项目时会得到它)。每个开发人员可能会在本地更改文件中的某些值 - 这些更改不应该被提交,我不希望它们在同步菜单中显示(我使用eclipse和颠覆性的,如果重要)。



请注意,我不能只设置svn:ignore属性,因为它仅适用于不在版本控制下的文件 - 但我确实希望在存储库中保留文件的基本版本。如何避免文件同步显示,而不从存储库中删除?



编辑:更好的描述 - 我实际需要的是能够在配置文件中设置只读属性,因此只要属性为on,就不能在存储库中进行更改。你知道这样吗?



谢谢

解决方案

这通过将文件的基本版本作为foo.base进行签入,并且svn锁定它,以便它在检出时是只读的。然后让每个开发者将此文件复制到自己的个人foo文件中,这将被svn-ignore忽略。


I have a configuration file in my project which needs to be in the repository (so new developers get it when they checkout the project). Each developer might change some values in the file locally - these changes should not be committed and I don't want them showing in the synchronization menu (I'm using eclipse and subversive if it matters).

Note that I can't just set the svn:ignore property since it only works on files that aren't under version control - but I do want to keep a base version of the file in the repository. How can I avoid the file showing in synchronization without deleting it from repository?

EDIT: A better description - what I actually need is to be able to set a "read-only" property on the config file, so it can't be changed in the repository as long as the property is on. Do you know anything like this?

Thanks

解决方案

I do this by having a base version of the file checked-in as foo.base, and svn lock this so that it's read-only on checkout. Then have each developer copy this file to their own personal foo file, which is ignored by svn-ignore.

这篇关于SVN - 忽略存储库中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆