claude-code - 💡(How to fix) Fix Claude made multiple mistakes during git branch management [1 comments, 2 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#46723Fetched 2026-04-12 13:34:44
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Code Example



---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude modified files I didn't ask it to modify

What You Asked Claude to Do

Claude Feedback Report

DATE: 2026-04-11

ISSUE

Claude made multiple mistakes during git branch management

MISTAKES

  1. Created start-new-git-commit-v2 from wrong branch (should be from master, not docs/update-sdlc-rules)

  2. Used cherry-pick without checking for conflicts first

    • Caused many conflicts
    • Had to abort
  3. Used git rm which deleted files from disk

    • User was not warned before running
    • Caused confusion and panic
  4. Files copied from v2 to v2.1 included renamed files

    • User asked for simple copy
    • Result was not same as expected
  5. Too many steps, too many mistakes

    • User is learning git for first time
    • Claude should have gone slower and simpler

IMPACT

  • User lost trust
  • User confused multiple times
  • Extra time wasted fixing mistakes

SUGGESTION

  • I am a vibe coder, very new to git
  • Claude should explain every step in simple words before doing anything
  • Claude should say "this will delete files from your computer" not just "git rm"
  • For new users, Claude should ask: "Do you want detailed explanation before each step?" (this can be turned ON or OFF by the user)
  • If user turns ON detail mode: Claude explains what will happen, what could go wrong, and what to expect BEFORE running any command
  • If user turns OFF detail mode: Claude runs fast with short messages only
  • Default should be ON for new users

What Claude Actually Did

Claude Feedback Report

DATE: 2026-04-11

ISSUE

Claude made multiple mistakes during git branch management

MISTAKES

  1. Created start-new-git-commit-v2 from wrong branch (should be from master, not docs/update-sdlc-rules)

  2. Used cherry-pick without checking for conflicts first

    • Caused many conflicts
    • Had to abort
  3. Used git rm which deleted files from disk

    • User was not warned before running
    • Caused confusion and panic
  4. Files copied from v2 to v2.1 included renamed files

    • User asked for simple copy
    • Result was not same as expected
  5. Too many steps, too many mistakes

    • User is learning git for first time
    • Claude should have gone slower and simpler

IMPACT

  • User lost trust
  • User confused multiple times
  • Extra time wasted fixing mistakes

SUGGESTION

  • I am a vibe coder, very new to git
  • Claude should explain every step in simple words before doing anything
  • Claude should say "this will delete files from your computer" not just "git rm"
  • For new users, Claude should ask: "Do you want detailed explanation before each step?" (this can be turned ON or OFF by the user)
  • If user turns ON detail mode: Claude explains what will happen, what could go wrong, and what to expect BEFORE running any command
  • If user turns OFF detail mode: Claude runs fast with short messages only
  • Default should be ON for new users

Expected Behavior

Claude Feedback Report

DATE: 2026-04-11

ISSUE

Claude made multiple mistakes during git branch management

MISTAKES

  1. Created start-new-git-commit-v2 from wrong branch (should be from master, not docs/update-sdlc-rules)

  2. Used cherry-pick without checking for conflicts first

    • Caused many conflicts
    • Had to abort
  3. Used git rm which deleted files from disk

    • User was not warned before running
    • Caused confusion and panic
  4. Files copied from v2 to v2.1 included renamed files

    • User asked for simple copy
    • Result was not same as expected
  5. Too many steps, too many mistakes

    • User is learning git for first time
    • Claude should have gone slower and simpler

IMPACT

  • User lost trust
  • User confused multiple times
  • Extra time wasted fixing mistakes

SUGGESTION

  • I am a vibe coder, very new to git
  • Claude should explain every step in simple words before doing anything
  • Claude should say "this will delete files from your computer" not just "git rm"
  • For new users, Claude should ask: "Do you want detailed explanation before each step?" (this can be turned ON or OFF by the user)
  • If user turns ON detail mode: Claude explains what will happen, what could go wrong, and what to expect BEFORE running any command
  • If user turns OFF detail mode: Claude runs fast with short messages only
  • Default should be ON for new users

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Yes, every time with the same prompt

Steps to Reproduce

No response

Claude Model

Sonnet

Relevant Conversation

Impact

Critical - Data loss or corrupted project

Claude Code Version

Claude CLI version: 2.1.101

Platform

Anthropic API

Additional Context

No response

extent analysis

TL;DR

Implement a detail mode in Claude that explains each step in simple words before executing git commands, especially for new users, to prevent mistakes and data loss.

Guidance

  • Introduce a "detail mode" that can be turned ON or OFF by the user, with a default setting of ON for new users.
  • In detail mode, Claude should explain what will happen, what could go wrong, and what to expect before running any command.
  • For critical commands like git rm, provide explicit warnings about potential data loss.
  • Consider adding a prompt for new users to confirm their understanding of the commands before execution.
  • Review and refine Claude's git branch management to prevent incorrect branch creation and cherry-picking without conflict checks.

Example

No specific code example is provided due to the lack of technical implementation details in the issue.

Notes

The solution relies on enhancing Claude's user interface and interaction to better support new users and prevent mistakes. The exact implementation details are not specified in the issue.

Recommendation

Apply workaround: Implement the suggested detail mode and refine Claude's git management to improve user experience and prevent data loss. This approach addresses the user's concerns and provides a safer interaction environment, especially for those new to git.

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