I try to commit changes to my repository, but I get the following message:
git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -FC:\Users\Contronym\AppData\Local\Temp\bkdweixb.mnu fatal: cannot lock ref 'HEAD': unable to resolve reference HEAD: Invalid argument Completed with errors, see above.
I use bitbucket and SourceTree.
What is the cause of this failure? Over the past week, I was able to fix the last 3 commits. Then, all of a sudden, I get 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 .git/objects/53/b65bd9b4fec7f6a7b0b3313c68199a18804327 , but this does not exist. There are two more files there, but b65bd9b4fec7f6a7b0b3313c68199a18804327 does not exist.
source share