Advanced
Open
Pro
Designing a Permission Rule for Destructive Git Operations
Your team's .claude/settings.json currently has:
{
"permissions": {
"allow": [
"Bash(git *)"
]
}
}
because a teammate got tired of approving git status and git diff
calls one at a time.
- What's specifically wrong with this rule, given the reversibility principle from earlier in the track?
- Rewrite the
permissionsblock to keep the convenience (no prompts for routine, read-only, or ordinary commit operations) while closing the gap. Be specific about which subcommands you allow and which you explicitly deny. - Why is an explicit
denyrule forgit push --force *a stronger guarantee than simply leaving it out of theallowlist?
Share this question