claude-code - 💡(How to fix) Fix /diff: stage untracked files from inside the diff view [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#60425Fetched 2026-05-20 03:58:52
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2
RAW_BUFFERClick to expand / collapse

Feature request

When /diff lists an untracked file/directory, it shows:

New file not yet staged. Run git add <path> to see line counts.

The instruction is correct but the friction is real — to see what's actually in the file, I have to leave the /diff UI, run git add in a separate shell, then re-open /diff. For a review-and-stage flow this is several extra steps per untracked path.

Request

Add an inline action (key binding + visible footer hint) to run git add <path> on the highlighted untracked entry without leaving the view. After staging, /diff should re-render with the now-visible line counts.

Bonus (not blocking)

  • git add -p style hunk staging from inside the diff.
  • Unstage action for already-staged paths.

Repro

  1. Create a new untracked file/directory in the repo.
  2. Run /diff.
  3. See the "New file not yet staged" message (see screenshot).
  4. Currently: must drop to a shell to stage, then re-run /diff.
<img width="2000" height="549" alt="Image" src="https://github.com/user-attachments/assets/7ff7dc1e-b24a-411c-8c3b-c5e95e665b87" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING