What is the long hexadecimal code that names a Git commit?

An object ID computed with the repository's hash algorithm.

Start playing free

  1. A random serial number
  2. A hash-based object ID ✔
  3. The date and time in hexadecimal

Why: Git names stored objects with a cryptographic hash. Traditional repositories use 40 hexadecimal SHA-1 digits, while SHA-256 repositories use 64, so the identifier depends on the repository's object format.

Huh, didn't know that: Git accepts an abbreviated object ID only when the prefix is long enough to be unique in that repository.

The dad joke
My commit hash is so long, I need a commit to remember it.
Like this card?
Play the game

References

Answer: A hash-based object ID. Git names stored objects with a cryptographic hash. Traditional repositories use 40 hexadecimal SHA-1 digits, while SHA-256 repositories use 64, so the identifier depends on the repository's object format.

  1. Pro Git book: What is Git? git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F
    This is a 40-character string composed of hexadecimal characters
    Checked 2026-10-10.
  2. Git hash function transition git-scm.com/docs/hash-function-transition
    Objects can be named by their 40 hexadecimal digit SHA-1 name or 64 hexadecimal digit SHA-256 name
    Checked 2026-10-10.

Think this answer is wrong? Tap "Challenge this answer" on the card in the game and tell us why.

Test yourself in the game