Git · Junior · Question 50 of 75
What does HEAD~1 refer to?
- 1The commit on the remote
mainbranch - 2The first commit in the repository
- ✓Correct answer: The parent of the current commit
Explanation
~n goes back n generations along first parents: HEAD~2 is the grandparent. HEAD^2 means the second parent of a merge commit.