Skip to content

Commit Hygiene

Easy — everyone uses thisGit & Version Control

ELI5 - The Vibe Check

Commit hygiene is treating your git history like something other people, including future you, will actually have to read, not just a diary of every save point your editor happened to catch. One commit, one logical change, a message that explains why instead of just restating what. Good hygiene means git blame and git bisect actually work when you need them; bad hygiene means the history is 40 commits of wip, fix, and asdf that tell you nothing.

Real Talk

Commit hygiene refers to maintaining a clean, logically atomic commit history, where each commit represents one coherent, buildable change accompanied by a message explaining its rationale, rather than an unstructured sequence of incremental save points. Good commit hygiene, often enforced through interactive rebase before merging, directly determines whether tools like git bisect, git blame, and git log --follow remain useful for debugging and code archaeology later on.

Show Me The Code

# bad
fix
wip
asdf
more fixes

# good
fix(auth): reject expired refresh tokens on renewal

# Previously an expired token would silently renew instead of
# forcing re-authentication, masking a session-hijack window.

When You'll Hear This

"Squash those 12 wip commits before you open the PR, nobody needs that history." / "Good commit hygiene is why bisect found the bug in six steps instead of sixty."

Made with passive-aggressive love by manoga.digital. Powered by Claude.