2 ms·
> When you checkout (now switch) a branch, HEAD is now the same as the branch (they point to the same commit). Actually, HEAD now points to that branch, which
by seba_dos1 1y ago
> When you checkout (now switch) a branch, HEAD is now the same as the branch (they point to the same commit).
Actually, HEAD now points to that branch, which in turn points to the commit. It's a different state than when HEAD points directly to the same commit (called "detached HEAD" in Git's terminology) where this issue doesn't happen as you're not on a branch at all. It's a subtle, but important distinction when trying to understand what happens under the hood there.
- skydhash 1y agoYou're right. I was trying to simplify.