【问题标题】:Using git svn on a repo created with svn2git在使用 svn2git 创建的 repo 上使用 git svn
【发布时间】:2013-04-23 08:06:45
【问题描述】:

我们正在将旧的 SVN 存储库迁移到 Git。这对svn2git 非常有效。现在我们想专门在 git 上工作,但需要将任何新的 git 提交镜像到旧的 SVN 存储库。这是必要的,因为一些生产系统仍然通过 SVN 部署。

所以我尝试在我之前运行svn2git 的同一个存储库上使用git svn。我(还)不是专家,但我认为,这样的事情应该可以解决问题:

$ git svn dcommit --interactive
Unable to determine upstream SVN information from HEAD history.
Perhaps the repository is empty. at /usr/lib/git-core/git-svn line 780.

我也尝试获取一些关于导入的SVN数据的信息:

$ git svn info
Unable to determine upstream SVN information from working tree history

所以似乎svn2git 做了一些魔术,让git svn 处于“未配置状态”。 据我所知,git 必须保留一些引用以将 SVN 提交映射到 git 提交。相反的命令svn2git --rebase 起作用:它获取任何新的 SVN 提交并将它们应用到 git repo。所以数据似乎在那里并且可供svn2git 使用(AFAIK 基于git svn)。

那么我怎样才能让git svn 工作呢?还是有另一种方法可以将 git 提交从该新仓库反向移植到 SVN(无需从头开始)?

【问题讨论】:

  • 所以您尝试使用git svn 直接在旧的SVN 存储库中提交?

标签: git svn svn2git


【解决方案1】:

试试“git svn rebase”。

我遇到了完全相同的问题,并使用了托管 @vhttps://github.com/nirvdrum/svn2git 的包装脚本。 请花点时间阅读SVN to GIT migration failed using svn2git

【讨论】:

  • 感谢您的回答。我无法真正判断它是否有效,因为我们无法及时解决问题,我们现在使用了不同的方法。无论如何我都会接受它作为正确答案;)。
  • 其实git svn rebase给出了和git svn info一样的错误信息:“Unable to determine upstream SVN information from working tree history”,所以不起作用。
猜你喜欢
  • 2018-11-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-04-09
相关资源
最近更新 更多