That name references the HEAD
to the "default branch".
Note that after a git init
, even that default HEAD doesn't exist: you need to make at least one commit: see "Why do I need to explicitly push a new branch?".
You can see 'master
' used in the very few commits of Git itself in commit cad88fd (Git 0.99, May 2005)
git-init-db
: set up the full default environment
Create .git/refs/{heads,tags}
and make .git/HEAD
be a symlink to (the as yet non-existent) .git/refs/heads/master
.
Its associated tutorial at the time mentioned:
One note: the special "master
" head is the default branch, which is why the .git/HEAD
file was created as a symlink to it even if it doesn't yet exist.
Basically, the HEAD
link is supposed to always point to the branch you are working on right now, and you always start out expecting to work on the "master
" branch.
However, this is only a convention, and you can name your branches anything you want, and don't have to ever even have a "master
" branch.
A number of the git tools will assume that .git/HEAD
is valid, though.