0

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.

Vampire
  • 35,631
  • 4
  • 76
  • 102
Lavock
  • 341
  • 3
  • 7

4 Answers4

2

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.

Lavock
  • 341
  • 3
  • 7
0

Were you able to spot the .git folder manually by going into your repository? you can try running below command to possibly get more information?

git fsck --full
Ia1
  • 500
  • 1
  • 7
  • 15
0

just try to rename your_project/.git/index file

AlexS
  • 918
  • 1
  • 12
  • 28
0

I had another .git folder in my subfolder, therefore, causing the error. I would remove the .git subfolder and then remove the cached folder you were looking to commit: git rm --cached subfoldername

zatamine
  • 3,458
  • 3
  • 25
  • 33
Krista
  • 11
  • 1