{"version":"2.1.327","anchor":"git-prompt-section-adds-a-commitpush-only-when-asked-rule","canonical_anchor":"git-prompt-section-adds-a-commitpush-only-when-asked-rule","heading":"Bash tool instructions gain git rules on committing only when asked and on secrets","tier":"notice","area":"Git","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/git-prompt-section-adds-a-commitpush-only-when-asked-rule","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Bash tool instructions gain git rules on committing only when asked and on secrets\n\nClaude's Bash instructions now group git advice under a header, say to commit or push only when asked, and warn against committing secret files\n\n**Unclear.** Which sessions include this Git section is not settled.\n\n**What**\n\nThe Bash tool is how Claude runs shell commands, and it comes with written instructions that Claude reads. The git part of those instructions changed:\n\n- \"- For git commands:\" is a new header line ahead of the git bullet points.\n\n- \"Commit or push only when the user asks. If on the default branch, branch first.\" is a new rule in the git section.\n\n- \"Do not commit files that likely contain secrets (.env, credentials.json, .claude\/settings.local.json, etc). Warn the user if they specifically request to commit those files.\" now appears as new text in the instructions Claude Code actually sends.\n\nThe secrets line shows up as new in the instructions captured from both the command line and the SDK, across many model arms, and also in the prompt used when a command starts up (the command-init prompt).\n\n**Why**\n\nThese lines are what Claude reads before running git. In practice Claude should commit or push only when you ask, create a branch first when it is on the default branch, and warn you before committing files that may hold secrets.\n\n- Area: Git\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}