在git 1.7.9.5中,我可以运行以下行而不会出现错误:
export SVNPASS=readonly
git clone git@github.com:dtenenbaum/RGalaxy.test.git
cd RGalaxy.test/
git config --add svn-remote.hedgehog.url https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/RGalaxy
git config --add svn-remote.hedgehog.fetch :refs/remotes/hedgehog
# the following is a shortcut to avoid fetching every commit since antiquity, since I happen to know the commit number
# where this folder was added to svn:
echo $SVNPASS | git svn fetch --username readonly hedgehog -r 65762:HEAD
git checkout -b local-hedgehog -t hedgehog
Run Code Online (Sandbox Code Playgroud)
在git 1.8.3.4和1.8.4.1中,最后一行导致:
fatal: Cannot setup tracking information; starting point 'hedgehog' is not a branch.
Run Code Online (Sandbox Code Playgroud)
对这个问题的评论表明降级,但我想知道为什么会发生这种情况:这是一个错误吗?如果是这样,有报道吗?或者有更好的方法来做到这一点,如果是这样,它是什么?
顺便说一句,"git branch -a"返回:
* master
remotes/hedgehog
remotes/origin/HEAD -> origin/master
remotes/origin/master
Run Code Online (Sandbox Code Playgroud)
Bas*_*ien 34
这不被git-svn开发人员视为错误.事实上,这是v1.8.3.2中的错误修复的结果.设置本地local-hedgehog跟踪git-svn hedgehog将不再有效.
从现在开始,干脆做
git checkout -b hedgehog remotes/hedgehog
Run Code Online (Sandbox Code Playgroud)
足以能够做所有你平时的git - svn的操作(git svn rebase,git svn dcommit,等).
这是Johan Herland的解释:
在v1.8.3.2之前,这仍然有点工作(如下所示),因为代码无法实现远程无效,并且回退到设置branch.feat-bar.remote ="." (即当前的回购).这可能看起来是一种好的做法,直到你意识到返回到无效上游的"git push"会愉快地覆盖refs/remotes /(mirror /)feat-bar,从而打破git-svn的内部状态.
此错误已在v1.8.3.2中修复,更具体地说是41c21f22(branch.c:使用refspec而不是refs/remotes/*验证跟踪分支),您可以在该提交消息中阅读有关该基本原理的更多信息.
最终结果是,升级到> = v1.8.3.2后,将不再接受设置本地专栏以跟踪git-svn的专栏.设置本地专栏分支以在git-svn的专栏上工作的正确方法是放弃上游关系,只需执行"git checkout -b feat-bar refs/remotes /(mirror /)专长-酒吧".
如果你想了解更多细节,我建议你阅读他的全部内容.
| 归档时间: |
|
| 查看次数: |
9388 次 |
| 最近记录: |