object ID

The hash that names a Git object, such as a commit, and that you type to refer to it.

In more detail

A full object ID is 40 hexadecimal characters with SHA-1; Git accepts any unambiguous prefix, which is why git log --oneline shows only about seven. The ID is calculated from the object's own bytes, so the same content always has the same ID and a changed object gets a new one.

Example

git rev-parse --short HEAD

Related terms

Taught in

References