I'm trying to import a large subversion repository into git using git-svn (so that I can work in git but still dcommit to subversion from time to time). After importing more than 4000 revisions I'm now getting the following error whenever I run git svn fetch
or git svn rebase
, which I don't manage to get rid of:
$ git svn fetch
error: invalid object 100644 1f2....742 for 'src/path/.../file.cs'
fatal: git-write-tree: error building trees
write-tree: command returned error: 128
What I've tried so far:
git fsck --full
doesn't report anything, neither does git fsck --unreachable
or git fsck --no-reflog
git gc --aggressive
doesn't helpgit unpack-objects
doesn't helpgit svn reset -rXY
with XY a bit lower than the latest imported revsion doesn't seem to help either, neither does manually removing the latest entries from the reflog
up to XY.I also didn't find out what error 128 really stands for. Any ideas? Thanks in advance!
Might be related to this question which is about error 128 as well but with different error messages, and without a solution.
msysgit version 1.6.4.msysgit.0
with bash on xp sp3
git svn gc
(possibly git gc
and git prune
before)
Short answer: Try resolving any merge conflicts, committing them, and they fetch/pull again.
Longer explanation: I'm guessing you resolved this issue, since it was posted so long ago. I'm writing this since Google's ranking of StackOverflow articles is high enough that other people with this problem would be very likely to visit this page if they had this error.
I encountered a similar error when trying to do a "git stash", what turned out to be the problem was that a merge conflict had occurred after a pull. I had not resolved & committed the conflict, and this left the repository in a state that prevented me from pulling/merging/etc...
If you make sure you don't have any blocking files, try again.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With