{"version":"2.1.281","anchor":"git-git-dir-and-work-tree-removed-from-the-bash-risky-fl","canonical_anchor":"git-git-dir-and-work-tree-removed-from-the-bash-risky-fl","heading":"git --git-dir and --work-tree removed from the Bash risky-flag table","tier":"notice","area":"Permissions","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/git-git-dir-and-work-tree-removed-from-the-bash-risky-fl","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### git --git-dir and --work-tree removed from the Bash risky-flag table\n\ngit's --git-dir and --work-tree left the Bash risky-flag table, and a new helper checks git commands for them instead\n\n**Unclear.** The finding does not say whether this changes which git commands ask for your approval.\n\n**What**\n\nBefore running a shell command, Claude Code checks it with a classifier, a set of rules that decides whether the command needs your approval. One of these rules is a table of risky flags for each command. Flags are the options that start with `--`.\n\nThe git entry in that table no longer lists `--git-dir` or `--work-tree`. It still lists flags such as `--upload-pack`, `--exec-path` and `--separate-git-dir`. A separate pattern elsewhere still names `--git-dir` and `--work-tree`.\n\nTwo new helpers were also added:\n\n- One checks git commands for `--git-dir` and `--work-tree`, and handles `git rev-parse` specially.\n\n- One reads a command even when it starts with comments.\n\n**Why**\n\nThese two flags point git at a different repository or working folder. They are now handled by a dedicated check rather than by the generic flag table.\n\n- Area: Permissions\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5"}