SVN如何仅删除本地副本?

发布于 2024-09-11 12:29:23 字数 270 浏览 8 评论 0原文

这是场景...我也在使用 tortoise SVN ...

我可以创建一个新文件夹并使用“仅此项目”选项进行结帐...这将仅结帐顶级文件夹,然后我可以去进入回购浏览器并选择我想要“更新到修订版”的任何子文件夹(在回购浏览器中右键单击,选择更新到修订版)...这只会删除该子文件夹...

有没有办法删除文件夹而不将其从存储库中删除?

如果没有,我的另一个选择是简单地单独签出子项目(这可能是最好的解决方案),让我们看看是否有人对上述问题有答案。

Here is the scenario ... I am also using tortoise SVN ...

I can create a new folder and do a checkout with the "only this item" option ... this will checkout just the top level folder, I can then go into the repo browser and select any subfolder i want to "update to revision" (in the repo browser right click, select update to revision) ... this will bring down only that subfolder ...

Is there a way to remove the folder without removing it from the repository?

If not, my other option is to simply checkout the subprojects individually (this might be the best solution), lets see if anyone has an answer to the above.

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

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

发布评论

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

评论(4

浅唱々樱花落 2024-09-18 12:29:23

我玩游戏有点晚了,但我刚刚遇到了同样的问题,但没有找到满意的答案。

我想出的答案是进行全面检查,然后

  1. 更新到修订版...
  2. 更新深度 ->选择项目...
  3. 取消选中任何您不需要的项目。

勾选使深度粘性,然后在将来的更新中保留该深度。

I'm a bit late to the game but I've just had the same question and not found a satisfactory answer.

The answer I came up with was to do a full checkout then

  1. update to revision...
  2. update depth -> choose items...
  3. untick any items you don't want.

ticking make depth sticky then retains this depth over future updates.

残疾 2024-09-18 12:29:23

要从本地存储库中删除之前签出的文件夹而不将其标记为已删除,请使用以下命令:

svn update <yourfolder> --set-depth=exclude

To remove a previously checked out folder from your local repo, without it being marked as deleted, use this command:

svn update <yourfolder> --set-depth=exclude
Bonjour°[大白 2024-09-18 12:29:23

正如您所建议的,单独检查子目录(它们本身可以被视为存储库)是最干净的方法。对于我见过的 SVN 存储库从根本上看像这样的人来说,这种情况很常见

/
  /proj1
    /trunk
    /branches
    /tags
  /proj2
    /trunk
    /branches
    /tags

Checking out the subdirectories (which can be treated as repositories in their own right) individually, as you suggested is the cleanest way to do this. That's pretty common with folks who I've seen have SVN repositories that look like this from the root

/
  /proj1
    /trunk
    /branches
    /tags
  /proj2
    /trunk
    /branches
    /tags
忆沫 2024-09-18 12:29:23

如果您从本地工作目录中删除该文件夹,则不会影响存储库中的版本。只有当您执行“svn delete”并提交更改时,它才会真正从存储库中删除该目录。

If you delete the folder from your local working directory it won't affect the version in the repository. Only when you do a 'svn delete' and commit the changes will it actually delete the directory from the repository.

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