Protect a branch (set policies)

Protect a branch (set policies) in Git — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need the main branch locked down so hotfixes and merges follow our safety checks. Set branch…
I need the main branch locked down so hotfixes and merges follow our safety checks. Set branch policies that require two reviewers, successful CI build, and no direct pushes to main; make the policy apply to everyone except the release bot. Do one test merge from feature/urgent-fix to confirm rules block direct push, then tell me what failed and what changed so I can announce to the team.

Improve — make it easier to accept

+
Before I push this change to the team, make it easy for reviewers to accept branch protection:…
Before I push this change to the team, make it easy for reviewers to accept branch protection: surface that two approvals and passing CI are required, show any exceptions (release bot), and call out the one workflow that will be blocked (direct pushes to main). Flag anything that could make a reviewer hesitate, such as required status checks that are flaky or long-running, and suggest a shorter status check to replace it.

Decide — diagnose the stuck moment

+
I turned on a protection policy for main requiring two reviewers and green CI; Devin reports his…

I just enabled branch protection on main and one developer says their hotfix push was rejected.

I turned on a protection policy for main requiring two reviewers and green CI; Devin reports his hotfix push was rejected. I do not know whether it failed review, CI, or the 'no direct push' rule, and I cannot tell Devin more without breaking the rule for troubleshooting. What is the most likely cause and the next action to unblock the hotfix while keeping protections intact?

Become — change the pattern

+
Over the last six months we repeatedly relax branch protections during incidents, then reapply them…

We keep re-enabling direct pushes after emergencies and then fixing the audit later.

Over the last six months we repeatedly relax branch protections during incidents, then reapply them and lose the audit trail and developer trust. Which small habit change will preserve both emergency speed and long-term safety so we stop eroding the policy? Recommend a concrete guardrail and how to enforce it with minimal friction for on-call engineers.

Next to this one

Other version control work people do in Git.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.