Git · Junior · Question 50 of 75

What does HEAD~1 refer to?

Explanation

~n goes back n generations along first parents: HEAD~2 is the grandparent. HEAD^2 means the second parent of a merge commit.

Further reading

Problem with a question

Git · Junior · question 50

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz