{"version":"2.1.319","anchor":"git-push-short-form-forcedelete-flags-now-match-the-push-de","canonical_anchor":"git-push-short-form-forcedelete-flags-now-match-the-push-de","heading":"Bash tool checks cover more risky git commands","tier":"notice","area":"Bash Safety","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319\/e\/git-push-short-form-forcedelete-flags-now-match-the-push-de","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319","markdown":"### Bash tool checks cover more risky git commands\n\ngit push -f and -d now match the push guard list, and a new check flags git commands that take a branch another worktree has checked out\n\n**What**\n\nThe Bash tool lets Claude run commands in a terminal. Claude Code checks some git commands against lists of risky forms before they run. Two of these checks now cover more:\n\n- `git push -f*` and `git push -d*` were added to the git push pattern list, so a force or delete flag at the very start, as in `git push -f`, is covered like the other forms. Before, the list held only `git push *--force*`, `git push * -f*`, `git push *--de*` and `git push * -d*`, which matched the short flags only after another argument.\n\n- A new check flags git commands that let a branch be taken while another worktree has it checked out. A worktree is a second working copy of the same repository. The check covers `checkout` or `switch` with `--ignore-other-worktrees`, `worktree add --force`, `fetch --update-head-ok` and `apply --unsafe-paths`, and it returns a detail and a suggested fix.\n\nThe Bash tool's description given to Claude is unchanged in the capture taken under this release.\n\n**Why**\n\nA plain `git push -f` no longer slips past the pattern list. Agents working in several worktrees are stopped from taking a branch out from under another working copy.\n\n- Area: Bash Safety\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}