user11810894
user11810894

Reputation:

Git refs - why is it called heads instead of branches?

Just curious when you look in the git/refs directory:

.git/refs/heads
.git/refs/tags

why is it called refs/heads instead of refs/branches?

Upvotes: 5

Views: 804

Answers (1)

VonC
VonC

Reputation: 1323115

can you give example of heads that are not branches?

A detached head is not a branch.
But all branches are referenced by a HEAD, as direct reference to the last commit of their branch.

Upvotes: 3

Related Questions