What
Permission rules for git push now automatically include the repo's configured push remote, not just origin.
Details
- Before adding a
Bash(git push origin *)rule, Claude now queriesgit config remote.pushDefaultto find the actual configured push target. - If only one remote is configured, it is used regardless of name.
- The resolved remote is added alongside
originin the allowed-patterns list, so bothgit push originandgit push {remote}are permitted. - This prevents unnecessary permission prompts for repos that push to
upstream, a fork remote, or any non-originname.
Evidence
Remote resolution (search for "remote.pushDefault"); dynamic rules (search for "git push -u" alongside "rwn")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agree
/commit-push-pr now auto-allows git push to the repo's configured push remote (remote.pushDefault, or the sole remote when only one is…