Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git "NO-HEAD" statement

Tags:

git

egit

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 ?

like image 247
Cemre Mengü Avatar asked Feb 15 '13 14:02

Cemre Mengü


People also ask

What is Git head command?

The HEAD points out the last commit in the current checkout branch. It is like a pointer to any reference. The HEAD can be understood as the "current branch." When you switch branches with 'checkout,' the HEAD is transferred to the new branch.

Where is the head in Git?

In Git, a head is a ref that points to the tip (latest commit) of a branch. You can view your repository's heads in the path . git/refs/heads/ . In this path you will find one file for each branch, and the content in each file will be the commit ID of the tip (most recent commit) of that branch.

What does no head mean in eclipse?

Your Eclipse has a version control plugin installed (probably Subclipse, a client plugin for subversion, or perhaps another one). "NO HEAD" I believe means that Eclipse/Subclipse can no longer find the latest copy of your project since you moved it outside of there.

Does head point to branch or commit?

In Git, HEAD refers to the currently checked-out branch's latest commit. However, in a detached HEAD state, the HEAD does not point to any branch, but a specific commit or the remote repository.


1 Answers

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?".

like image 60
VonC Avatar answered Sep 20 '22 20:09

VonC