执行“git svn init”时指定显式获取引用
当执行 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我怀疑唯一的方法是编写一个调用 git svn init 然后调用 git config 的脚本。
I suspect the only way would be to write a script that calls
git svn init
and thengit config
.