Suggest an editImprove this articleRefine the answer for “What is a commit from Git's perspective?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A commit** is a Git object that contains a reference to the tree, a reference to the parent commit, the author, the date, the message, and a cryptographic hash. **Key point:** a commit is an immutable Git object that contains a snapshot of the project and references to previous commits.Shown above the full answer for quick recall.Answer (EN)ImageA commit is a **Git object** that contains: - a reference to the **tree** (the project's file structure); - a reference(s) to the **parent commit** (one or more); - the author and committer; - the date and time; - the commit message; - a cryptographic **hash** (SHA-1 / SHA-256). ## What "snapshot" means - each commit captures the **full state of the project**; - unchanged files are **reused by reference**, not copied; - commits form a **directed acyclic graph (DAG)**. ## Why a commit cannot be changed - a commit's hash is computed from its content; - any change -> a new hash -> a **new commit**; - this guarantees the **integrity of the history**. ## How Git uses commits - a branch is a **pointer to the latest commit**; - `HEAD` points to the current commit; - a merge is a commit with multiple parents. ## Short version for an interview > **A commit is an immutable Git object that contains a snapshot of the project and references to previous commits.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.