I'm trying to upload a file to github and I keep getting this error when I type "git add ." or "git commit -m 'message'" in command line (on mac os x 10.9). I am not sure what this means
'atal: Reference has invalid format: 'refs/Icon
Same problem I had with Google Drive. I simply deleted all the "Icon" files in my project folder, then, git works.
find . -name "Icon*" -type f -delete
In case you have a file named "Icon" something, use the command below will keep your own "Icon" file.
find . -type f \( -name "Icon*" ! -name "*.*" \) -delete
I had the same problem trying to push from Google Docs shared directory. When moved (and recreated) .git into local home, problem gone away.
The answer "Git fatal: Reference has invalid format: 'refs/heads/master
'" mentions looking for "*conflicted*
' files in .git
find .git -name '*conflicted*'
The OP confirms having done a similar operation.
The file I opened was in
.git/refs/heads/
and had some weird text which didn't seem necessary
I would rather try and clone again the repo, report my modification (add, commit), and try to push again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With