Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'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

like image 876
user3681670 Avatar asked Jun 12 '14 13:06

user3681670


3 Answers

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
like image 106
Bruce Yong Li Avatar answered Oct 19 '22 20:10

Bruce Yong Li


I had the same problem trying to push from Google Docs shared directory. When moved (and recreated) .git into local home, problem gone away.

like image 33
Dmytro Avatar answered Oct 19 '22 19:10

Dmytro


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.

like image 1
VonC Avatar answered Oct 19 '22 18:10

VonC