3

Copied files & sub-directories into local working directory...then did "git add [sub-directory name]" Tons of warnings in git console: "warning: LF will be replaced by CRLF in [insert sub-directory or file name here]. The file will have its original line ending in your working directory." The console scrolls through as it seemingly adds files in the working directory to be tracked, completes add. When following this with "git status" I get the following:

error: bad index file sha1 signature
fatal: index file corrupt
fatal: git status --porcelain failed

Now I already know how to reset the git index (rm -f .git/index then git reset...thanks to Stackoverflow), but why is the above error message cropping up? Is it because I'm trying to add too many files at once (< 600MB)...or because I'm exceeding storage limits on my micro git account (a soft limit of 0.6 GB)? (FYI: If I reset the index, the files are no longer added. If I repeat the same thing, I get the same error when I try to check the status.)

Sean
  • 1,149
  • 18
  • 28
  • 2
    I can't help you with your main issue, but I can tell you that the size of your github account doesn't matter if you're not pushing anything. – Andy Jul 18 '11 at 05:35
  • Btw, are you using git in a cygwin session? or the msysgit Windows distro? Are you on Windows? What is your git version? – VonC Jul 18 '11 at 06:22
  • 1
    Sean, could you tell me if the following answer can help: I would really advise against any kind of "automagic" transformation like eol (end of lines). Set `core.autocrl to false` (as [recommended by me here](http://stackoverflow.com/questions/6665820)), and manage if you must [eol through gitattributes files](http://stackoverflow.com/questions/2354278). Then try to add everything again, in an empty local Git repo, and see if the issue persists. I tried to post that answer twice. It has been downvoted twice, without any comment (which isn't helpful for you or me) – VonC Jul 18 '11 at 13:44
  • @Andy: I am pushing...from the local machine to GitHub. – Sean Jul 18 '11 at 22:52
  • @VonC: I did, indeed, change the core.autocrl to false, and followed the thread of your hyperlinks. I have created--although not added any conditionals into--a .gitattributes file. I imagine there'd be quite a few, especially where images are involved. (The repo is for a large CMS.) Your change might have helped, as I'm able to stage files now. Not sure how the EOL change will affect things going from GitHub to the local machine or a remote server, however. (I didn't know that could be such a fickle matter!) FYI: using most recent msysgit distro for Windows & most recent git distro. – Sean Jul 18 '11 at 22:59

1 Answers1

1

Have you tried

git gc

It might help.

Yax
  • 436
  • 3
  • 12