0

I've recently starting using Git worktrees and found something interesting that I can't find any docs for online. When I create a worktree, the "head" and "HEAD" references are not identical and point to different things. While on a worktree, the "head" reference points to the original master branch, while the "HEAD" reference points to the latest commit on the worktree.

Why is that? And why don't both point to the same commit?

Thanks.

Praxder
  • 2,315
  • 4
  • 32
  • 51

0 Answers0