[FEATURE] Let bashEditDiff skip commands such as git checkout

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 4, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

bashEditDiff attaches a diff of every file a Bash command changed. That's useful when Claude edits files with sed, heredocs or scripts. But git commands that rewrite the working tree (git checkout/git switch to another branch, git pull, git stash pop, git rebase) change many files without editing anything. Each of these produces a long diff in the transcript that is confusing to read and uses up context. Turning bashEditDiffEnabled off removes the useful diffs as well.

Proposed Solution

A setting that lists commands to skip, using the same pattern syntax as permission rules:

{
  "bashEditDiffExcludeCommands": ["git checkout:*", "git switch:*", "git pull:*", "git stash:*", "git rebase:*"]
}

These git commands could also be skipped by default.

Alternative Solutions

Turning off bashEditDiffEnabled entirely, which also hides the diffs for the edits it was meant to show. Path exclusions (#99342) don't help here, because a branch switch can touch any file.

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

  1. Claude edits a few files on a feature branch with sed; the diffs are useful.
  2. Claude runs git switch main to compare behaviour.
  3. Every file that differs between the branches scrolls by as a diff, and the real edits are lost among them.

Additional Context

Related: #99342 (path exclusions for bashEditDiff).

View original on GitHub ↗