Git · Junior · Question 5 of 75

What identifies a commit in Git?

Explanation

A commit's ID is a SHA-1 (or SHA-256) hash of its tree, parents, author and message. Change anything and the hash changes, which is why rewriting history creates new commits.

Further reading

Problem with a question

Git · Junior · question 5

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