git svn dcommit不行

时间:2011-02-16 12:18:58

标签: svn git git-svn

我要将范围git存储库迁移到新的svn存储库。 我按照以下步骤操作:http://sandrotosi.blogspot.com/2010/02/migrate-git-repo-to-svn-one.html

问题是,当我运行命令

git svn dcommit

错误消息是:

digger$ git svn dcommit
Committing to http://repository_url_path/trunk ...
A   .gitmodules
A   vendor/rails
6ce13429cbc1359d85e1dc99c84561840e89d455 doesn't exist in the repository at /opt/local/libexec/git-core/git-svn line 4277
Failed to read object 6ce13429cbc1359d85e1dc99c84561840e89d455 at /opt/local/libexec/git-core/git-svn line 558

怎么能解决它?

谢谢!

1 个答案:

答案 0 :(得分:4)

您正在使用带有git-svn的子模块。

您可以重写git历史记录以将其删除http://de-co-de.blogspot.com/2009/02/git-svn-and-submodules.html

$ git tag bad mywork~5
$ git checkout bad
$ # make changes here and update the index
$ git commit --amend
$ git rebase --onto HEAD bad mywork

或更简单http://ignoredbydinosaurs.com/2011/06/quick-trip-panic-room

$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch vendor/rails'