执行“git svn init”时指定显式获取引用

发布于 2024-12-04 01:58:17 字数 425 浏览 4 评论 0原文

当执行 git svn init 时,获取引用将始终为 :refs/remotes/git-svn 。这可以手动更改,但为了尽可能自动化 git,如果有一个命令行选项可以将此值更改为其他值,那就太好了。

例如,运行此:

git svn init url1 -R r1

填充 .git/config 为:

[svn-remote "r1"]
    url = url1
    fetch = :refs/remotes/git-svn

是否有一个选项可以强制获取行类似于:

[svn-remote "r1]
    url = url1
    fetch = :refs/remotes/branch1

When doing git svn init, the fetch ref will always be :refs/remotes/git-svn. This can be changed by hand, but in the hope of automating git as much as possible, it would be great if there was a command-line option that changes this value to something else.

E.g. running this:

git svn init url1 -R r1

populates .git/config with:

[svn-remote "r1"]
    url = url1
    fetch = :refs/remotes/git-svn

Is there an option to force the fetch line to something like:

[svn-remote "r1]
    url = url1
    fetch = :refs/remotes/branch1

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

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

发布评论

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

评论(1

总攻大人 2024-12-11 01:58:17

我怀疑唯一的方法是编写一个调用 git svn init 然后调用 git config 的脚本。

I suspect the only way would be to write a script that calls git svn init and then git config.

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