3

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!

8
  • 1
    Sounds like your git repo is incomplete? Or maybe you're using submodules or something like that? What does git show 6ce13429cbc1359d85e1dc99c84561840e89d455 say ? Feb 16, 2011 at 12:23
  • 1
    You should check your repo with git fsck.
    – Rudi
    Feb 16, 2011 at 13:13
  • What version of git are you running? The line-numbers aren't even close to match with my version (1.7.4)...
    – kusma
    Feb 16, 2011 at 13:16
  • 2
    See stackoverflow.com/questions/5016324/git-svn-dcommit-not-work it is because of git submodule usage.
    – freespace
    May 17, 2011 at 9:03
  • 3
    freespace - your comment is recursive!
    – Jesse
    Jun 2, 2011 at 23:56

1 Answer 1

4

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'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.