What is HEAD in Git? - Stack Overflow 
What is HEAD in Git?
Asked 12 years, 8 months ago
Modified 7 months ago
Viewed 644k times

1243


You see the Git documentation saying things like

The branch must be fully merged in HEAD.

But what is Git HEAD exactly?

ou can think of the HEAD as the "current branch". When you switch branches with git checkout, the HEAD revision changes to point to the tip of the new branch.

You can see what HEAD points to by doing:

cat .git/HEAD
In my case, the output is:

$ cat .git/HEAD
ref: refs/heads/master




stackoverflow.com/questions/2304087/what-is-head-in-git

Eklenme Tarihi - 04-11-2022 | Son Güncelleme - 02-05-202424 kez gösterildi.