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 HEADRelated terms
- commit — A saved snapshot of the whole project in Git, together with its author, committer, time, message and a pointer to the commit before it.
- pinning — Fixing an exact version or digest of something you depend on so it cannot change without you noticing.
- commit tag — An image tag made from the commit SHA that produced the image, so any running container can be traced to its source.
- SHA-1 — An older hash function producing a 160-bit value, now considered broken for security because collisions can be created on purpose.
- hash — A short fixed-length fingerprint calculated from data, which changes completely if even one byte of the data changes.
- Git object — One item in Git's database, a blob, tree, commit or annotated tag, stored under the hash of its content.
Taught in
- Workflows, Jobs, Steps, and Actions — Continuous Integration & Continuous Delivery Pipelines
- Triggers and the Event Model — Continuous Integration & Continuous Delivery Pipelines
- Securing Pipelines: Secrets Management — Continuous Integration & Continuous Delivery Pipelines
- Building and Pushing Container Images — Continuous Integration & Continuous Delivery Pipelines
- Why Version Control, And Why Git Won — Advanced Git Internals & Distributed Workflows
- What A Commit Really Is — Advanced Git Internals & Distributed Workflows
- The Three Areas: Working Tree, Index, Repository — Advanced Git Internals & Distributed Workflows
- Reading History: log, show And diff — Advanced Git Internals & Distributed Workflows
- A Branch Is A Moving Pointer — Advanced Git Internals & Distributed Workflows
- HEAD, And Why Detached HEAD Is Not An Error — Advanced Git Internals & Distributed Workflows
- Amend, And The One Hard Rule — Advanced Git Internals & Distributed Workflows
- Investigating History: blame, bisect And worktree — Advanced Git Internals & Distributed Workflows
- Tags And Releases — Advanced Git Internals & Distributed Workflows