--stdlayout 在 git svn clone 中起什么作用?
我刚刚发现这个问题关于从没有完成的克隆中恢复-标准布局。我没有找到该标志的文档 - 它有什么作用?
I just spotted this question about recovering from a clone done without --stdlayout. I didn't find documentation of this flag - what does it do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Subversion 没有任何分支或标签的概念。相反,通常通过简单地将存储库的内容复制到目录中来模拟这些。
为了让 git svn 能够识别分支和标签以及主分支(“主干”),您必须使用
--tags< 明确告诉它在哪里可以找到它们/code>(或
-t
)、--branches
(或-b
)和--trunk
(或-T
)选项。然而,许多 Subversion 存储库都遵循 Subversion 书中规定的标准约定:
--trunk=/trunk --branches=/branches --tags=/tags
。--stdlayout
(或-s
)对此约定进行编码,这样您就不必在每次克隆 Subversion 存储库时传递相同的参数。您可以在
git-svn(1)
手册页中找到此信息,您可以在 Unix 下使用man git-svn
访问该手册页,并通过以下方式以独立于操作系统的方式访问该信息:内置 Git 帮助系统,带有 git help svn 。 所有 Git 手册页也可以在 Kernel.Org 上找到,它们是通常是您搜索git-svn(1)
。Subversion doesn't have any concept of branch or tag. Instead, those are typically simulated by simply copying the contents of the repository into a directory.
In order for
git svn
to be able to recognize branches and tags and the main branch ("trunk"), you have to explicitly tell it where to find them, using the--tags
(or-t
),--branches
(or-b
) and--trunk
(or-T
) options.However, many Subversion repositories follow a standard convention, laid out in the Subversion book, of
--trunk=/trunk --branches=/branches --tags=/tags
.--stdlayout
(or-s
) encodes this convention, so that you don't have to pass the same arguments every time you clone a Subversion repository.You can find this information in the
git-svn(1)
manual page, which you can access under Unix withman git-svn
and in an operating system independent fashion via the builtin Git help system withgit help svn
. All of the Git man pages are also available on Kernel.Org and they are usually the first search result when you search forgit-svn(1)
.--stdlayout
(-s
) 告诉git-svn
应将/branches
中的文件夹作为分支导入,/tags
中的文件夹是项目状态的快照,应作为标签导入。主分支将设置为/trunk
。它相当于
--trunk=trunk --tags=tags --branches=branches
--stdlayout
(-s
) tellsgit-svn
that folders in/branches
should be imported as branches, and that folders in/tags
are snapshots of a project state and should be imported as tags. The master branch will be set to/trunk
.It's equivalent to
--trunk=trunk --tags=tags --branches=branches