FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
"branch-guard: Stop Claude Code From Committing to Main"
How-ToTools

"branch-guard: Stop Claude Code From Committing to Main"

via Dev.toBoucle3h ago

You gave Claude Code a task. It did the work, then committed directly to main . Now you have untested code on your production branch with no PR review. branch-guard prevents this by blocking git commit on protected branches. Install curl -fsSL https://raw.githubusercontent.com/Bande-a-Bonnot/Boucle-framework/main/tools/branch-guard/install.sh | bash What it does branch-guard is a Claude Code hook that runs before every bash command. When it sees git commit on a protected branch, it blocks the command and suggests creating a feature branch instead. Blocked: $ git commit -m "fix: update auth" (on main) → branch-guard: Direct commit to 'main' is not allowed. Suggestion: Create a feature branch first: git checkout -b feature/your-change Allowed: $ git commit -m "fix: update auth" (on feature/auth-fix) → ✓ proceeds normally $ git commit --amend (on main) → ✓ amending existing commits is allowed Default protected branches: main , master , production , release . Configure Create .branch-guard

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

How-To

Deep dive — Building a local physics-informed ML workflow for fluid simulations

Medium Programming • 2h ago

Stop Struggling with PDFs in Flutter — Here’s Everything You Need to Know
How-To

Stop Struggling with PDFs in Flutter — Here’s Everything You Need to Know

Medium Programming • 2h ago

Statistical Edge: How to Know If Your Strategy Actually Works
How-To

Statistical Edge: How to Know If Your Strategy Actually Works

Dev.to Beginners • 2h ago

Vibe Coding: When Software Became A Conversation, Not Code
How-To

Vibe Coding: When Software Became A Conversation, Not Code

Medium Programming • 9h ago

How I Won the MTD Marathon 2026 — Building a Personal Diary App in Just 4 Hours
How-To

How I Won the MTD Marathon 2026 — Building a Personal Diary App in Just 4 Hours

Medium Programming • 12h ago

Discover More Articles