使文件夹不受 SVN 管理 [英] Making the folder unmanaged by SVN

查看:47
本文介绍了使文件夹不受 SVN 管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从存储库中删除文件夹,就像它不会从每个用户的本地存储库中删除一样?

Is it possible to delete the folder from repository the way it wont be removed from each user's local repository?

就我而言,有一个名为 'config' 的目录旨在进行版本控制.现在我们决定从版本控制中删除该目录,但将其保留在每个人的计算机上(顺便将其添加到 svn:ignore).问题是,如果我用svn delete"删除该目录 - 它会从每个人的计算机中删除,我不希望那样.

In my case there is a directory named 'config' that was intended to be version-controlled. Now we decided to remove that directory from version-control but leave it on each person computer (and add it to svn:ignore by the way). Problem is, if I delete that directory with "svn delete" - it will get deleted from everyone's computer and I don't want that.

推荐答案

我所知道的唯一方法是将其保留在您自己的工作副本中:

Only way I know of is to keep it on your own working copy:

svn delete --keep-local

你被卡住了,因为你不能忽略一个版本控制的文件.

You're stuck because you can't ignore a version controlled file.

如果它真的很重要并且您使用 TortoiseSVN,那么您可以分两个阶段执行操作 - 创建一个客户端预更新挂钩以导出目录(或文件),然后在后期-update (在 svn:ignore 添加到工作副本之后)再次复制目录或文件.

If it's really important and you use TortoiseSVN, then you could perform the operation in 2 phases - create a client-side pre-update hook to export the directory (or files), then in post-update (after svn:ignore has been added to working copy) copy the directory or files back again.

虽然听起来像一个正确的 PITA,恕我直言,你最好发送电子邮件解释情况并在提交之前提前通知导出 config.

Sounds like a right PITA though and IMHO you're probably better off sending an email explaining the situation and giving advance notice to export config before you do the commit.

这篇关于使文件夹不受 SVN 管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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