SVN 是否有与“hg 克隆”等同的词?在 Mercurial 或“git clone”中在 Git 中?
我有一个 Subversion 存储库的 URL,在 Ubuntu 的命令行上,我只想下载存储库的副本,就像在 Mercurial 中输入:
hg clone http://svn.somerepository.com/somerepository/trunk/docs/
如何在 SVN 中“克隆”存储库?
另外,我只想获取
docs
文件夹下的所有内容 - 我不想从主干开始 - 你会如何做这样的事情:< /p>svn克隆http://svn.somerepository.com/somerepository/trunk /docs/
I have a URL for a Subversion repository and on the command line on Ubuntu I want to just download a copy of the repository as you would do in Mercurial by typing:
hg clone http://svn.somerepository.com/somerepository/trunk/docs/
How do you "clone" a repository in SVN?
Also, I just want to get everything below the
docs
folder - I don't want to start in the trunk - how would you do something like this:svn clone http://svn.somerepository.com/somerepository/trunk/docs/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您想要执行 SVN 领域中所谓的“签出”。
请注意,SVN 与 Mercurial 或 Git 等分布式系统之间的主要区别在于,SVN 的“签出”命令仅下载每个文件最新版本的副本,而使用
hg clone
您实际上最终会以及存储库整个历史记录的本地副本。这会对您的工作方式产生一些影响。例如,您需要与服务器建立网络连接才能检索日志、执行差异等。You want to perform what in SVN-land is called a "check out."
Note the main difference between SVN and distributed systems like Mercurial or Git is that SVN's "check out" command downloads only a copy of the most recent version of each file, whereas with
hg clone
you will actually end up with a local copy of the repository's entire history as well. This has some implications for the way in which you work. For example, you need to have a network connection to the server in order to retrieve logs, perform diffs, etc.如果您只需要获取当前版本,
svn checkout
就足够了。如果您想要存储库的完整副本,包括所有以前的版本,您可以使用
svnsync
。它可以复制完整的存储库并增量下载新的提交。但我认为它不能仅限于子目录。If you just need to grab the current version,
svn checkout
is all you need.If you want a complete copy of the repository, including all previous versions, you can use
svnsync
. It can copy a complete repository and incrementally download new commits. I don't think it can be restricted to subdirectories though.如果没有管理员访问权限(即执行svnadmin
命令的能力),您就无法克隆存储库。svn co检查子树http://....../docs
You can't clone the repository without having admin access to it (i.e. the ability to dosvnadmin
commands).svn co http://....../docs
其中“co”是“checkout”的缩写。
In which "co" is short for "checkout".