Version Control Checklist
Steps an engineering team runs to set up a new repository and adopt healthy version-control practices — branch protection, commit hygiene, code review, release tagging, and contributor collaboration.
Repository Setup
-
Initialize the repo with README and .gitignore
Seed the repo with a README that names the service, owners, and how to run it locally. Use a language-appropriate .gitignore from github/gitignore — committing build artifacts and node_modules is one of the most common rookie mistakes and is painful to undo from history.
-
Add LICENSE and CODEOWNERS files
Pick a license (MIT, Apache 2.0, or proprietary) before any external contributor sees the repo — adding one later requires every prior contributor's sign-off. CODEOWNERS routes review automatically; without it, PRs get stuck waiting for the wrong people.
-
Set the repository visibility
Public repos require contributor-facing files (CONTRIBUTING, CODE_OF_CONDUCT) and a license that permits external use. Private repos skip those but should still capture internal contribution norms.
Collects list -
Publish CONTRIBUTING and CODE_OF_CONDUCT files
For public repos, GitHub surfaces these files in the contribution flow. Use the Contributor Covenant for the code of conduct; the CONTRIBUTING file should describe branching, commit format, and how to run tests locally.
Branch Management
-
Document the branching strategy
Pick one model — trunk-based with short-lived feature branches, GitHub Flow, or Git-flow with develop/release branches — and write it into CONTRIBUTING. Mixing models silently is how teams end up with abandoned long-lived branches and merge conflicts that take days to resolve.
-
Configure branch protection on main
Require pull requests, dismiss stale reviews on new commits, require linear history, and block force pushes. Without protection rules, a single git push --force can silently rewrite shared history.
-
Enable auto-delete of merged branches
Turn on the repo setting that deletes head branches after merge. Schedule a monthly prune of stale remote branches older than 90 days — repos with hundreds of dead branches make git branch output unreadable and slow down clones.
Commit Practices
-
Adopt Conventional Commits for messages
Use the feat:, fix:, chore:, docs:, refactor: prefix convention. It enables automated CHANGELOG generation (semantic-release, release-please) and makes git log --oneline actually useful during incident triage.
-
Install pre-commit hooks for secret scanning
Wire gitleaks or trufflehog into a pre-commit hook (use the pre-commit framework). Once a secret lands in git history, rotation is necessary but not sufficient — the value lives in every clone forever unless you rewrite history with git-filter-repo or BFG.
-
Block direct pushes to main
Branch protection should reject direct pushes from everyone, including admins (uncheck "allow administrators to bypass"). Every change goes through a PR — this is the audit trail SOC 2 change-management controls require.
Code Review and Merging
-
Require CODEOWNERS approval on protected paths
Map sensitive directories (auth, billing, infra/, migrations/) to the engineers who actually know them. "LGTM" reviews from people who can't read the diff are how regressions ship; CODEOWNERS routes the right eyes to the right code.
-
Wire CI status checks as required for merge
Mark the lint, type-check, unit-test, and SAST jobs as required status checks. The biggest anti-pattern is letting reviewers merge red because "the test is flaky" — quarantine flaky tests in a separate suite instead.
-
Enforce a PR size budget
Set a soft cap (e.g., 400 lines changed) and ask authors to split larger PRs. Review quality drops sharply past that threshold; reviewers skim and miss real issues. Configure a danger.js or PR-size-labeler bot to warn automatically.
Collects number -
Pick a merge strategy
Squash-and-merge keeps main's history linear and one-commit-per-feature; rebase-and-merge preserves authored commits. Disable the merge-commit option unless you have a reason — merge commits clutter git log on main.
Release Management
-
Tag the release with semantic versioning
Use vMAJOR.MINOR.PATCH per semver.org. Bump MAJOR on breaking API changes, MINOR on new features, PATCH on fixes. Sign tags with GPG or sigstore so consumers can verify provenance — increasingly required for SLSA and federal SBOM compliance.
-
Update the CHANGELOG for this version
Follow keepachangelog.com — group entries under Added / Changed / Deprecated / Removed / Fixed / Security. Tools like release-please can generate this from Conventional Commits, but a human should still review wording before publishing.
-
Cut the release from a dedicated branch or tag
Build the artifact from the tagged sha, not from a moving branch. "Deployed from main" is how you end up unable to reproduce a build six months later when chasing a regression.
-
Run the post-release smoke suite
Run the synthetic critical-path checks (auth, checkout, primary read path) against the deployed artifact. If smoke fails, the previous tag's container image must still be in the registry — verify before cutting, not during the rollback.
Collects list -
Roll back to the previous tag
Redeploy the prior signed tag's container image; revert any forward-only DB migration via the documented rollback script. Open a SEV2 incident and file a hotfix branch off the prior tag, not off main.
Collaboration and Communication
-
Wire the repo to Jira or Linear
Install the GitHub-Jira or GitHub-Linear integration so commit messages and PR titles containing the issue key auto-link both ways. This is the cheapest audit trail for change management — every shipped commit traces back to an approved ticket.
-
Publish PR and issue templates
Add .github/pull_request_template.md and .github/ISSUE_TEMPLATE/ with prompts for context, testing steps, and rollout plan. Without templates, PR descriptions devolve to one-liners and reviewers waste time asking for the same context every time.
-
Capture the release announcement link
Post the release notes to #engineering and the customer-facing changelog. Record the URL here so support, sales, and the on-call engineer all reference the same source of truth during the post-release watch window.
Collects url
Use this template
Copy it to your account, customize the steps, and run it with your team in minutes.
Browse hundreds of free templates across every team and industry.
Back to template libraryRun Version Control Checklist with your team
Customize the steps, assign roles, set a schedule, and keep a complete record for every run.