在 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
在 git 1.8.3.4 和 1.8.4.1 中,最后一行导致:
fatal: Cannot setup tracking information; starting point 'hedgehog' is not a branch.
对这个问题的评论建议降级,但我想知道为什么会这样:这是一个错误吗?如果是这样,是否已报告?或者有没有更好的方法来做到这一点,如果是这样,它是什么?
顺便说一句,“git branch -a”返回:
* master
remotes/hedgehog
remotes/origin/HEAD -> origin/master
remotes/origin/master