如何从 Subversion 中删除文件(使其“无版本化”)?

发布于 2024-09-12 05:28:08 字数 370 浏览 7 评论 0原文

我一直有这个问题,但我还没有找到真正的答案。

假设您设置您的合作伙伴设置一个新项目并导入它的每个文件,包括那些与环境配置相关的文件,这些文件在开发过程中不应受到源代码控制(即数据库配置文件)。

因此,我第一次检查该项目,显然我必须更改数据库配置文件才能使其工作。但随后该文件被标记为已更改并将显示在提交列表下,那么此时是否有办法“取消版本控制”?

我尝试了“删除并添加到忽略列表”,但这只会标记要删除的文件,一旦我提交,我的合作伙伴将更新项目并发现他的数据库配置文件已被删除。

那么,如何真正处理这些依赖于环境的文件呢? (假设您已经将它们添加到存储库中)。您只是在本地更改文件并在每次提交时取消选中它?

谢谢,如果这是一个愚蠢的问题,我很抱歉。

I'm always having this problem and I didn't found the answer yet really.

Let's say you setup your partner setups a new project and imports every single file of the it, including those ones related to enviroment configuration which should not be under source control during the development (ie. the database config file).

So then I checkout the project for the first time and obviously I have to change the database config file to make it work. But then that file is marked as changed and will be show under the commit list, so is there a way to "unversion-it" at that point?

I tried "Delete and add to ignore list", but that will just mark the file to be deleted and once I commit, my partner will update the project and found that his db config file was deleted.

So how is really the way to work with those environment-dependent files? (Supposing you've already add them to the repo). You just change the file locally and keep unchecking it on every commit?

Thanks, and sorry if this is a silly question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

栀子花开つ 2024-09-19 05:28:08

我认为许多应用程序都有一个 db.conf.sample ,将其放入版本控制中,然后人们将其重命名为 db.conf ,这在版本控制中被忽略。

I think many applications have a db.conf.sample that they put in version control, and then people rename it to db.conf which is ignored on the version control.

一曲琵琶半遮面シ 2024-09-19 05:28:08

告诉您的合作伙伴备份文件,然后使用上下文菜单中的“删除”选项。然后它也会从您的副本中删除,并且不再进行版本控制。

Tell your partner to backup the file and then use the Delete option from the context menu. It will be then also deleted in your copy and will not be versioned anymore.

陌上芳菲 2024-09-19 05:28:08

虽然背后很痛苦,但总有这个。直到最近我才经常使用 subversion,所以我希望有更好的解决方案。不过,它确实给了我你想要的东西。

It's a pain in the backside, but there's always this. I've not use subversion much until recently, so I hope there's a better solution. It does give me what you want, though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文