How do I resolve a git-svn index mismatch?
I've had this error twice and both times resolved it by removing the svn folder inside the .git folder.
rm -r .git/svn
then rebuild the svn metadata with:
git svn fetch
You will probably see a message along the lines of:
Migrating from a git-svn v1 layout...
Data from a previous version of git-svn exists, but
.git/svn
(required for this version (1.7.0.4) of git-svn) does not exist.
Done migrating from a git-svn v1 layout
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.
Please don't remove the .git/svn folder to fix this. It requires you to rebuild everything, it is annoying, it will take awhile (for the size of my repo several hours) and it is NOT NECESSARY.
I found the right answer here and I've included it below.
From the link:
Inside the .git directory run the following:
$ find . -exec grep -Hin 5b32d4ac2e03a566830f30a702523c68dbdf715b {} \;
Binary file ./svn/.caches/lookup_svn_merge.db matches
Binary file ./svn/.caches/check_cherry_pick.db matches
Now delete the matching .svn/.caches from the output of the first command
$ rm ./svn/.caches/lookup_svn_merge.db
$ rm ./svn/.caches/check_cherry_pick.db
Now git svn rebase
or git svn fetch
to your heart's content.