Search code examples
gitgit-svn

How to resolve “Error: bad index – Fatal: index file corrupt” when using Git-SVN


i'm currently using git svn in one of my repo and when i do

git svn fetch

i got

Found possible branch point: coherent tag ref
Initializing parent: ok stuff

error: bad index file sha1 signature
fatal: index file corrupt
command returned error: 128

Is ther a way to fix this ? It's a kind of an horrible repo. It take days to synch to that point, i dont want to start from begining :/.

I try the

rm .git/index

from How to resolve "Error: bad index – Fatal: index file corrupt" when using Git but there is no such file.


Solution

  • The solution was to delete the "index" in the refs svn folder (from the root repo):

    rm .git/svn/refs/{path/to/incriminated/ref}/index
    

    Then my

    git svn fetch
    

    worked again.