When I did a git svn rebase it stopped at one point saying:
Index mismatch: SHA key of a tree != SHA key of another tree.
(I come to know that these SHA keys corresponds to a tree and not a commit from git show of the above two sha keys.)
re-reading <sha index of a commit in svn/trunk>
... list of files ...
fatal: bad object <SHA1 index of the bad object>
rev-list -1 <SHA1 index of the bad object> --not <SHA1 index of the revision it was trying to re-read>: command returned error: 128
I am not very experienced in the internal workings of git, so is there a sequence of steps to follow to dissect problems like these and possibly resolve them?
Update git client and refetch last svn commits using:
where 12345 is existing svn revision.
I ran into this during the initial cloning turns out someone created a branch called trunk which conflicted with the real trunk. After ignoring /branches/trunk all worked
I've had this error twice and both times resolved it by removing the svn folder inside the .git folder.
then rebuild the svn metadata with:
You will probably see a message along the lines of:
and after while (rebuilding can take a while especially on large repositories) you should end up with a working mirror of the svn repository again.
The problem there is that you have to do this systematically in this case :
Something missing, everything crash. The only way I know to recover is do remove all svn in .git and rebuild everything. It's just annoying and take a while !