如何在现有的git存储库中获取新数据并提交到svn?
我正在使用 git-svn 从 git 获取 svn repo 中的数据。我使用一些周围的工作成功地将数据从 git 导入到 svn 与子模块(我将子模块转换为 git 的子树),并且工作正常。
但现在我陷入困境了。如果我想获取 git pull 现有 git 存储库的更新数据,它会为我提供本地分支上的所有更新数据,但我无法使用 git svn dcommit 命令 dcommit 到 svn,它会给我错误消息,如下所示:
Unable to determine upstream SVN information from HEAD history
Perhaps the repository is empty. at /usr/libexec/git-core/git-svn line 521.
Any非常感谢有关如何执行此操作的说明!
I am using git-svn to get a data in svn repo from git. I successfully did import data from git to svn with submodules (I converted submodules as sub-tree of git) using some around work, and it worked fine.
But now I am getting stuck. If I want get a git pull a update data of existing repos of git, it gives me all updated data on my local branch, but I am not able to dcommit to svn using git svn dcommit command it gives me error message as follows:
Unable to determine upstream SVN information from HEAD history
Perhaps the repository is empty. at /usr/libexec/git-core/git-svn line 521.
Any instructions on how to do this would be very much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可能是错的,但我的理解是 git-svn 不能与上游 git repo 共享,只能与 subversion 共享。
我完全用我的 git 尝试做你想做的事情,从远程 git 存储库中拉取,然后推送到颠覆存储库。
我现在做的是使用 git 来执行我的 SCC,然后将文件复制到仅由 subversion 控制的本地树中,然后将其签入 subversion。
我编写了一个 ruby 脚本,它在本地 git 工作树和本地 subversion 之间进行同步。它只复制已更改的文件和我关心的文件。然后我从 subversion 工作树执行正常的 svn ci 操作。
好吧,我在这里找到了我的理解来源... http://git-scm.com/docs /git-svn 标题下的警告...
I may be mistaken but my understanding is that git-svn cannot be shared with an upstream git repo only a subversion one.
I totally hosed my git trying to do what you are trying to do, pull from a remote git repo then push to a subversion one.
What I now do is use git to do my SCC, and I copy files into a subversion only controlled local tree and then check that into subversion.
I wrote a ruby script which does the sync between the local git working tree and the local subversion one. It only copies changed files and only the files I care about. Then I do a normal
svn ci
from the subversion working tree.Ok I found the source of my understanding here... http://git-scm.com/docs/git-svn under the heading CAVEATS...