git-svn dcommit错误:无法确定上游SVN信息 [英] git-svn dcommit error: unable to determine upstream SVN information

查看:99
本文介绍了git-svn dcommit错误:无法确定上游SVN信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试git-svn,但出现以下错误.到目前为止,我所做的是

I m trying out git-svn and I am getting the following error. What I've done so far is

 git svn init -T <my svn repo> 

然后我一直使用

 git commit -a

然后我做了一些我做过的事

then once I did a few of those I did a

 git svn fetch

然后我尝试了

 git svn dcommit

但是,这失败了

无法从HEAD历史记录中确定上游SVN信息. 仓库可能是空的

Unable to determine the upstream SVN information from HEAD history. Perhaps the repository is empty

我还可以看到我的文件系统中的文件没有被标记为svn正在使用(不确定这是否应该发生).如果我使用repo浏览器浏览svn存储库,则可以看到原始文件在那里.

I can also see that the files in my file system are not marked as being used by svn (not sure if this should happen or not) though. If I browse the svn repository (with repo browser) I can see that the original files are there.

在最初的失败之后,我尝试 rebasing 并没有获得很大的成功(它引发了其他错误).

After this original failure I tried rebasing without much success (it throws some other error).

推荐答案

git svn命令类似于处理普通遥控器(svn遥控器命名为git-svn). fetch只是从远程下载提交,它不会以任何方式将它们连接到您的树.如果您在初始化之后立即进行获取,它将起作用,因为您还没有树,但是您先提交了.您要使用git svn rebase,它将把您的树重新放置到svn头上.通常,您在git svn init之后紧随git svn fetch,或者只是使用git svn clone,两者都可以.设置初始存储库后,您就可以一直使用git svn rebase,它只需一次操作即可获取和重新设置

The git svn commands are similar to dealing with a normal remote (the svn remote is named git-svn). fetch just downloads commits from the remote, it doesn't connect them to your tree in any way. It will work if you fetch right after initing, since you don't have a tree yet, but you committed first. You want to use git svn rebase, which will rebase your tree onto the svn head. Normally you git svn fetch right after git svn init, or just use git svn clone, which does both. Once the initial repository is set up you can just use git svn rebase all the time, which fetches and rebases in one operation

这篇关于git-svn dcommit错误:无法确定上游SVN信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆