19

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?

2 Answers 2

27

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.

Sign up to request clarification or add additional context in comments.

Comments

2

Selecting the "master [branch]" item from the Source ref list will insert "refs/heads/master" into the Source ref field.

Before:

"master [branch]" item in Source ref list

After:

"refs/heads/master" inserted in Source ref field

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.