如何使用 TortoiseSVN 仅签出(下拉)SVN 树的部分内容?
我正在使用 TortoiseSVN,我想将现有存储库签出到本地目录中。但是,我只想拉下文件树的某些部分。我有办法做到这一点吗?
例如:
/trunk
/project-A
/project-B
/project-C
假设我只想拉下主干、项目 A 和项目 B。我该怎么做?
I'm using TortoiseSVN and I want to do a Checkout of an existing repository into a local directory. However, I only want to pull down certain portions of the file tree. Is there a way I can do that?
For instance:
/trunk
/project-A
/project-B
/project-C
Let's say I just want to pull down trunk, project-A and project-B. How do I do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
看起来您很成功,但我想提供一个分步指南,希望对其他人有帮助。
trunk
检出到工作副本,深度 =“仅此项目”这只会将您选择的子文件夹拉入工作副本。
It looks like you were successful but I wanted to include a step-by-step guide in the hopes that it is helpful to others.
trunk
into a working copy with depth = "Only this item"This will pull only the subfolder(s) you've selected into your working copy.
这可能会晚一些,但对于任何发现这个问题并想知道是否可以排除现有目录的人:似乎有一种方法可以做到这一点。
如果该目录没有任何本地 mod,则应该删除该目录,并将其从进一步的更新中排除。如果您需要恢复该目录,请使用上面的 Michael Hackner 的方法。
This may be coming late, but for anyone finding this question and wondering if you could exclude existing directories: there appears to be a way to do so.
That should delete the directory if it doesn't have any local mods and exclude it from further updates. If you ever need the directory back, use Michael Hackner's method above.
从上面扩展自治的答案...
如果您已经签出整个项目,然后想要从中排除某些文件夹或文件....
这应该会删除您取消选择的目录/文件,并将它们排除在进一步的更新之外。如果您需要恢复该目录,请重复该过程并更改您的选择。
Expanding on autonomy's answer from above ...
If you have checked out a whole project and later want to exclude certain folders or files from it....
That should delete the directories/files you have deselected and exclude them from further updates. If you ever need the directory back, repeat the process and change your selection.
如果您进入project-A文件夹并右键单击==>SVN Update,它只会更新project-A文件夹及其子文件夹。然后你可以对项目B做同样的事情
If you go into the project-A folder and right-click==>SVN Update, it will only update the project-A folder and it's subfolders. Then you can do the same for project-B
这也适用:
[1] - 请注意,如果您部分签出子文件夹(没有该子文件夹内的所有项目),文件随后会添加到该子文件夹中子文件夹并已提交,您在执行定期结帐时将不会获得它们。
此问题与您可以使用 Subversion 进行部分结账吗? 但具有使用 TortoiseSVN 的特定上下文。
This works as well:
[1] - Do note that if you checkout subfolders partially (without all the items inside that subfolder), and files are subsequently added to that subfolder and committed, you will not get them when you perform a regular checkout.
This question is related to Can you do a partial checkout with Subversion? but with a particular context of using TortoiseSVN.