Zuruck zum Glossar
Git & Versionskontrolle

Commit

A snapshot of changes in a Git repository that records modifications to files along with a message describing what changed and why.

Definition

A commit is Git's fundamental unit of change. Each commit has a unique SHA-1 hash identifier, contains the actual file changes (diff), author information, timestamp, and a commit message. Commits form a linked list (each pointing to its parent), creating the repository's history. Good commit practices include atomic commits (one logical change per commit) and descriptive messages.

Warum es wichtig ist

Well-structured commits make code review easier, enable precise rollbacks, and create a readable project history. The conventional commits specification helps teams maintain consistent commit messages. Tools like git bisect use commits to find when bugs were introduced.

Beispiel

After fixing a login bug, a developer stages the changed files and runs: git commit -m "fix: resolve session timeout on mobile Safari browser". This creates a permanent record of the fix.

Verwandte Begriffe

git commitwhat is commitcommit meaninggit commit message

Automatisieren Sie Code Review mit diffray

Multi-Agent KI-System fur Code Review. Findet automatisch Bugs, Sicherheitslucken und Architekturprobleme.