[英]fatal: Not a valid object name: 'refs/remotes/trunk'
After using git svn
with clone and fetches I end with a local git repository that looks as follows. 将git svn
与clone和访git svn
一起使用后,我以一个本地git存储库结尾,该存储库如下所示。 Note that I have made a first push to my Git server Atlassian's Stash but as result I only have in-sync with the git server the master branch: 请注意,我已首先推送到Git服务器Atlassian的Stash,但结果是我只与git服务器master分支同步:
c:\myproject>git branch -a
* master
remotes/origin/1335-branch
remotes/origin/master
remotes/origin/tags/0.1
remotes/origin/trunk
Following direction from Migrating from SVN to Git ... and trying to convert the remote svn branches to local Git branches I do: 遵循从SVN迁移到Git的指示,并尝试将远程svn分支转换为本地Git分支,我这样做:
c:\myproject>git branch origin/trunk refs/remotes/trunk
fatal: Not a valid object name: 'refs/remotes/trunk'.
and then I get the OP error fatal: Not a valid object name: 'refs/remotes/trunk'
and I can't see why it happens 然后我得到fatal: Not a valid object name: 'refs/remotes/trunk'
的OP错误fatal: Not a valid object name: 'refs/remotes/trunk'
,但我看不到为什么发生
Your tutorial is probably made with a different version of git-svn
. 您的教程可能是使用其他版本的git-svn
。 Formerly the --prefix
was empty by default, in newer versions it is origin/
by default. 以前--prefix
默认情况下为空,在较新版本中,默认情况下为origin/
。 Because of that you have now refs/remotes/origin/trunk
and so on instead of refs/remotes/trunk
. 因此,您现在有了refs/remotes/origin/trunk
等,而不是refs/remotes/trunk
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.