The Day I Broke main

"Don't commit directly to the main branch." The first thing I was told when I joined a team. I knew the rule, but I was just fixing a typo in an error message. Surely that didn't need a branch. So I pushed straight to main.
Turns out, the surrounding code was more connected than I thought. A screen started throwing errors, and automated deployment pushed it to production. Slack exploded. I tried to undo it but had no idea how to use git revert. A senior engineer calmly fixed it and said: "That's why we use branches."
From that day on, I always create a branch, no matter how small the change. A branch is insurance, and a courtesy to your team. By the way, GitHub and GitLab offer "branch protection" to block direct pushes to main entirely. Plenty of teams enable it. Humans make mistakes, so we build systems to catch them.
