Pushing to main still needs a process
By Flavio
Updated
Tagged: DevTools
Direct pushes can keep development simple, but trust needs concrete checks. Look at access, traceability, tests, and recovery before copying a team's workflow.
Pushing straight to main only tells you where code lands, not how carefully anyone checked it. You can review a small diff, test the affected flow locally, and push directly with confidence, or you can open a pull request and click merge without really reading it. Whenever I look at another team’s workflow, I care less about the final Git command and more about the habits around it.
Small changes make review easier
Amp’s How We Build page talks about keeping changes small enough to test and revert cleanly, with the person who lands the change owning the outcome. That tells me far more than a vague claim about moving fast, because it points straight to what a small change looks like, how it gets checked, and what happens when it breaks.
Take a simple example: adding an archive action to a reading app. Before that change lands, you want to verify ordinary search, archive search, and restoring an item back to the main list. Whether the diff arrives in a pull request or sits in your local checkout, those checks still have to happen. The tool you use to edit the code doesn’t replace them, which I also talked about in What changes when you stop opening the code editor?.
The drawing follows a change from its author to a running app. Permission to push is only one step along that path; tests and a record of what was deployed tell you different things.
Be explicit about access
Before handing write access to more tools, answer three questions: who can update the production branch, which credentials can deploy it, and whether an unattended agent can do either. A workflow that relies on a human reading every diff breaks down quickly if an agent starts pushing commits while you’re asleep.
GitHub’s branch protection documentation covers required checks and push restrictions. Whatever rules and bypass permissions you turn on there are what the repository enforces. Don’t mistake a line in an agent’s prompt for an actual repository safeguard; check both if you want to prevent accidental pushes.
Make every change traceable
SOC 2 often gets thrown around in debates about pushing to main as shorthand for “strict process.” The AICPA’s SOC reports evaluate specific controls in scope, so pushing directly to main doesn’t tell you on its own whether a team passes or fails.
Focus on practical traceability instead. Make sure you can tie any production change back to its author, see which checks ran on it, and notice if anyone weakens or bypasses those checks.
Plan for bad changes too
Even well-reviewed commits break things sometimes, so record which revision is live and know how you’ll recover. Running git revert can roll back application code, while a database migration or an email that already went out needs its own recovery path.
That’s why not every commit needs the same ceremony. A typo fix on a docs page and a billing change shouldn’t go through identical review, even if both end up on main.
Before adopting another team’s Git workflow, trace one of your recent changes from request to production. Write down who verified the behavior and how you would undo it if it failed. Fix whatever part feels shaky before worrying about whether you need another branch.
Want me to talk about your product? You can sponsor this site.
Related posts about devtool: