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
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.
I downloaded a git repository from my Google Drive to a different computer and the folder icon looked as this one
And after running the following command mentioned by Yong (I've already upvoted)
find . -name "Icon*" -type f -delete
The icon of the folder became regular as follows
and problem got resolved. But this command can also delete some icons files being used on purpose so we need to get rid of the icon files being used for customising the folder/sub-folders icons. So a slightly modified command is as follows
find . -name Icon? -type f -delete
You can also change the google drive sharing option to OFF for all the folders - bit laborious but does remove the error as I just tried it.