Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: "Error: refusing to create funny ref 'HEAD' remotely" for initial push

Tags:

git

egit

I am attempting an initial push of my Git repository from Egit (Eclipse Git) to GitHub. Unfortunately I am getting the following error:

error: refusing to create funny ref 'HEAD' remotely

I set both the source and destination ref to 'HEAD'

What does this error message mean?

like image 907
Casebash Avatar asked Aug 13 '12 00:08

Casebash


1 Answers

I fixed this by selecting master (refs/heads/master) as the source ref instead. Egit then automatically set the destination ref to master as well. I suppose that this command tells git to create the master branch, while selecting HEAD either tries to create a branch called HEAD or tries to push to the current (non-existing) remote HEAD.

like image 87
Casebash Avatar answered Sep 24 '22 23:09

Casebash