githubfatal-error

Why does git gives me Bad File Fatal Error


Git is saying that I need to pull before pushing to fast-forward but when I issue git pull origin master it returns this error:

fatal: failed to read object 12786e6d70d76ce47ecf69c30e4d0f994d1e2fc3: Invalid argument
fatal: The remote end hung up unexpectedly

I tried doing git cat-file -t 12786e6d70d76ce47ecf69c30e4d0f994d1e2fc3 but that returns

12786e6d70d76ce47ecf69c30e4d0f994d1e2fc3: bad file

How do I see which file is the bad one and how can I fix it?
Can I just delete everything and begin again?


Solution

  • I deleted everything and pulled again. Couldn't get any work done so I had to do it :( Anyone who has any answers feel free to post.