Commit Ids

Commit Ids

Git automatically assigns a 32-digit hexadecimal ID to each commit. Each commit ID is guaranteed to be unique within its repository.

You will notice that Git often shortens the commit IDs to a 7-digit hexadecimal number. In many Git commands you can refer to specific commits using commit IDs. It would be annoying to have to type out all 32 digits so Git allows you to use just the first several digits of the ID (as long as it is a unique prefix).

You will use this feature of using commit ID short forms soon.