I'm trying to commit the changes to my repository but I receive the error below:
git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:UsersContronymAppDataLocalTempkdweixb.mnu
fatal: cannot lock ref 'HEAD': unable to resolve reference HEAD: Invalid argument
Completed with errors, see above.
I'm using bitbucket and SourceTree.
What's the reason for this commit failing? I was able to commit just fine the last 3 commits over the past week. Then, all of a sudden, I receive this error.
EDIT
I ran git gc
and these are the results:
$ git gc
error: bad ref for HEAD
error: bad ref for HEAD
error: inflate: data stream error (unknown compression method)
fatal: loose object 53b65bd9b4fec7f6a7b0b3313c68199a18804327 (stored in .git/objects/53/b65bd9b4fec7f6a7b0b3313c68199a18804327) is corrupt
error: failed to run repack
I checked the directory .git/objects/53/b65bd9b4fec7f6a7b0b3313c68199a18804327
but that doesn't exist. There's two other files there, but b65bd9b4fec7f6a7b0b3313c68199a18804327
doesn't exist.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…