Git

When you run git branch how does Git know the SHA-1 of the last commit?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

Using the HEAD file: .git/HEAD