Nobody breaks main. Not even me. Now it's a rule.
Published on July 20, 2026
𝗡𝗼𝗯𝗼𝗱𝘆 𝗯𝗿𝗲𝗮𝗸𝘀 `𝗺𝗮𝗶𝗻`. 𝗡𝗼𝘁 𝗲𝘃𝗲𝗻 𝗺𝗲. 𝗡𝗼𝘄 𝗶𝘁'𝘀 𝗮 𝗿𝘂𝗹𝗲. 🔒
"It's urgent, I'll push it directly to main."
That phrase has sent more bugs to production than anything else in software history 😅
I applied branch protection rules to my repos. Here's what's active:
🔒 𝗣𝗥 𝗿𝗲𝗾𝘂𝗶𝗿𝗲𝗱 — no change goes directly to `develop` or `main`. Everything goes through a Pull Request.
👥 𝟭 𝗺𝗶𝗻𝗶𝗺𝘂𝗺 𝗮𝗽𝗽𝗿𝗼𝘃𝗮𝗹 — someone else has to review before merging.
🔄 𝗔𝗽𝗽𝗿𝗼𝘃𝗮𝗹 𝗿𝗲𝘀𝗲𝘁𝘀 — if you push new commits after being approved, back to review from scratch.
✅ 𝗦𝘁𝗮𝘁𝘂𝘀 𝗰𝗵𝗲𝗰𝗸 𝗿𝗲𝗾𝘂𝗶𝗿𝗲𝗱 — the `pr-checks` workflow in 𝗚𝗶𝘁𝗛𝘂𝗯 𝗔𝗰𝘁𝗶𝗼𝗻𝘀 must pass green. No green, no merge.
🚫 𝗙𝗼𝗿𝗰𝗲 𝗽𝘂𝘀𝗵 𝗯𝗹𝗼𝗰𝗸𝗲𝗱 — the history of protected branches cannot be rewritten.
🗑️ 𝗗𝗲𝗹𝗲𝘁𝗶𝗼𝗻 𝗯𝗹𝗼𝗰𝗸𝗲𝗱 — `develop` and `main` cannot be deleted.
And most importantly 👇
𝗧𝗵𝗲𝘀𝗲 𝗿𝘂𝗹𝗲𝘀 𝗮𝗽𝗽𝗹𝘆 𝘁𝗼 𝗲𝘃𝗲𝗿𝘆𝗼𝗻𝗲. 𝗜𝗻𝗰𝗹𝘂𝗱𝗶𝗻𝗴 𝗮𝗱𝗺𝗶𝗻𝘀. 𝗜𝗻𝗰𝗹𝘂𝗱𝗶𝗻𝗴 𝗺𝗲 🔐
Hotfixes and emergencies also go through PR. If something is urgent, find someone to review quickly — don't skip the process. Urgency is not an excuse, it's exactly the moment when you need another person's eyes the most 💪
A team that protects its branches trusts its 𝗽𝗿𝗼𝗰𝗲𝘀𝘀𝗲𝘀, not individual reflexes 🚀
Does your team have branch protection active? Or does someone still have direct push to `main`? 👇
Keep flying, Champions! ✈️