anthropics / anthropics/claude-code

[Bug] Dangerous git checkout command wipes user files without confirmation

Open
#95,156 0 comments 0 reactions 0 assignees View on GitHub
area:tools bug data-loss platform:linux
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

**Bug Description**
Bug report drafted: Ran `git checkout -- .` with a dirty tree and wiped the user's u… │
│ │ - What happened: While moving a UI prototype onto a throwaway branch, the model ran git branch X, git stash push -- , then git checkout X -- .. …

**Environment Info**
- Platform: linux
- Terminal: tmux
- Version: 2.1.274
- Feedback ID: bfe5732f-ec5e-4f9d-be06-b5531f70c978

**Errors**
```json
[]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The report names no files, tests, or entry points. Reproduce the listed branch, stash, and checkout sequence in a disposable repository, then trace the git command execution and confirmation path. Done means a destructive checkout is not run without explicit user confirmation.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
cli, developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.