git add causes corrupt index error
I am having a bit of a problem here with git. I have a drupal set up. I have the proper .gitignore set up.
everytime i do git add . and git status. i get index file corrupt error.
I followed this Ho开发者_运维问答w to resolve "Error: bad index – Fatal: index file corrupt" when using Git to fix it, but it keeps coming back. I tried removing entire .git folder. but it didnt work.
Does anyone know how to fix this?
I was having this exact problem.
I figured out my problem was that there were two other .git folders in subdirectories. I had cloned two repos into these sub folders. I removed these two .git folders and I was able to use git again.
To find these other .git folders I ran this command:
find . -name ".git" -type d
精彩评论