简体   繁体   中英

git svn dcommit not work

I'm to migrate a extent git repository to a new svn repository,. I'm follow this steps: http://sandrotosi.blogspot.com/2010/02/migrate-git-repo-to-svn-one.html

The problem is, when I run the command

git svn dcommit

The error message is:

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

How can'i fix it?

Thanks!

You are using submodules with git-svn.

You can rewrite git history to remove it 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

Or easier http://ignoredbydinosaurs.com/2011/06/quick-trip-panic-room :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM