如何仅使用一些文件夹来git svn标签?

发布于 2025-02-11 21:52:47 字数 320 浏览 3 评论 0 原文

我有一个标准的SVN回购:

  • 分支/
  • 标签/
    • 0.1/
    • 0.2/
  • trunk/
    • devops/
    • 代码/

我想通过git-svn标记 devops 代码文件夹 tags/0.3 。 使用 git Svn标签0.3 而不是内部所有存储库,包括 tags branches 。我该如何排除它们?

I've a standard svn repo:

  • branches/
  • tags/
    • 0.1/
    • 0.2/
  • trunk/
    • devops/
    • code/

and i want to tag devops and code folders into tags/0.3 by git-svn.
Use of git svn tag 0.3 instead creates a new tag with all the repo inside, including tags and branches. How can i exclude them?

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

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

发布评论

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

评论(1

本王不退位尔等都是臣 2025-02-18 21:52:48

请参阅 man git-svn

对于“标准布局”中的SVN存储库(这是指, branch/ tags/ trunk/像您一样),您应该通过 - stdlayout / -s to git svn clone

这将具有将SVN“分支”和“标签”映射到Git分支的效果; SVN行李箱将成为GIT的主分支。

您的示例中,GIT回购中的预期工作树内容是:

.
├── code
├── devops
└── .git

Please see man git-svn.

For svn repos in the "standard layout" (which means, branches/ tags/ trunk/ like you have), you should pass --stdlayout/-s to git svn clone.

This will have the effect of mapping svn "branches" and "tags" to git branches; and svn trunk will become the master branch in git.

The expected working tree content in git repo for your example is this:

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