Quality & Team

Version Control Hygiene (Git)

Foundational

Git history is the project's record: how we understand why the code is the way it is, review changes, and recover when things go wrong. Small, focused commits with clear messages, and never committing secrets or generated files, make that record useful. A messy history and a leaked secret in a commit are both expensive to undo.

Good version-control habits make everything else easier. Reviews are clearer, you can search the history to find a bug, reverting is clean, and a teammate can read the history to understand a decision. For newer engineers the most valuable habits are simple: commit small and often, write a message that says why, and never commit a secret.

This goes with how we work day to day: short-lived branches integrated to trunk often (see Trunk-Based Development), changes small enough to review well (see Code Review), and the pipeline as the only path to production (see CI/CD & Deployment).

Commit with care

Never commit these

One dump, vague message, a secret git commit -am "stuff"
// includes: feature + refactor + a committed appsettings with a real key

Impossible to review (everything at once), a useless message, and a live secret now in the history forever. Deleting it later does not make it safe; it must be rotated.

Focused, explained, clean git commit -m "Fail closed when screening times out

Previously a timeout was treated as 'clear'. Now we block-and-escalate
so an unscreened customer can't be auto-approved."
// secret stays in Key Vault; .gitignore excludes local config

One logical change, a message that explains the why, and no secret in the repo. A readable history that helps the next person.

Self-review checklist

Why it matters: Clean version control keeps a codebase understandable, reviewable, and recoverable over years. And a single committed secret can become a breach that outlives the commit that introduced it. Small, clear, secret-free commits are a cheap habit that pays back every time someone reads, reviews, or has to undo a change.