iDevelop Solutions
git

Version Control Habits That Save You Later

Version control is only as useful as the history you leave in it. A few habits make that history something you can actually use.

What version control is for

Version control tracks changes to files over time, so you can see what changed, who changed it and why, and go back when needed. Git is the most widely used distributed system for it.

Commit small, commit often

One commit should do one thing. Small commits are easier to review, easier to revert and easier to understand months later.

Write messages for your future self

Fix currency rounding in invoice totals

Totals were rounded per line instead of once at the end,
which drifted by a cent on large invoices.

A short summary line, a blank line, then the reason. The diff already shows what changed; the message should say why.

Branch for every change

  • Keep the main branch always working.
  • Create a short-lived branch for each feature or fix.
  • Merge or rebase it back once it is reviewed.

Never commit secrets

Passwords, tokens and keys do not belong in a repository, even a private one. Use environment variables or a secrets manager, and add local config files to .gitignore from the start.

last updated 2026-10-20