30

I am using EGit plugin for Eclipse but whenever I add my project to Git, the plugin puts a "NO-HEAD" indication next to my project folder in Eclipse directory view. Am I doing something wrong ? What does this mean ?

Cemre Mengü
  • 15,408
  • 24
  • 97
  • 154

1 Answers1

43

It can simply mean that, until you make your first add and first commit, you have no branch (not even a master one), hence no HEAD referencing any branch.

See more in "Why do I need to explicitly push a new branch?".

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • 1
    Problem: The no-branch may indicate the need to push, but there appears to be no way to do the push from Egit! The only thing that it allows is to commit, which you cannot do because with no-head you can't stage anything. The only solution seems to be to do the push from the command line -- meaning you have to go through the whole git installation, etc. This is a serious flaw in the tool -- meaning that it is pretty useless for adding new repos. It only seems to work well when you have everything already set up. To set up new repos, you have to use something else! – Factor Three May 16 '17 at 16:00
  • You should be able to create a new branch from EGit, and then commit and push – VonC May 16 '17 at 16:02