简体   繁体   English

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

[英]Specify explicit fetch ref when doing “git svn init”

When doing git svn init , the fetch ref will always be :refs/remotes/git-svn . 当执行git svn init ,获取引用将始终是: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. 可以手动更改,但是希望尽可能自动执行git,如果有一个命令行选项可以将此值更改为其他值,那就太好了。

Eg running this: 例如运行此:

git svn init url1 -R r1

populates .git/config with: 用以下命令填充.git/config

[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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM