google-gemini / google-gemini/gemini-cli
Gemini ran git reset --hard HEAD in plan mode with uncomitted changes
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
Gemini 3.1 pro decided to run `git reset --hard HEAD` in plan mode, while it was supposed to be planning how to address a review of the current changeset. I have altered policies to allow many things in plan mode to allow for MCP servers, but it should be smart enough to not even try this.
### What did you expect to happen?
Gemini, especially pro, to be smart enough to not wipe out all of my changes, regardless of policies.
### Client information
Client Information
Run `gemini` to enter the interactive CLI, then run the `/about` command.
```console
> /about
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ About Gemini CLI │
│ │
│ CLI Version 0.38.2 │
│ Git Commit b0ed611a0 │
│ Model Auto (Gemini 3) │
│ Sandbox no sandbox │
│ OS win32 │
│ Auth Method gemini-api-key │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
### Login information
_No response_
### Anything else we need to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.