Voltar ao glossario
Git e Controle de Versao

Commit

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

Definicao

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.

Por que e importante

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.

Exemplo

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.

Termos relacionados

git commitwhat is commitcommit meaninggit commit message

Automatize Code Review com diffray

Sistema de IA multi-agente para code review. Encontra bugs, vulnerabilidades de seguranca e problemas de arquitetura automaticamente.