# error: Your local changes to the following files would be overwritten by merge:
	file.txt
Please commit your changes or stash them before you merge.

- **ID:** `git/stash-conflict-on-pop`
- **Domain:** git
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Running 'git stash pop' when the working directory has uncommitted changes that conflict with the stashed changes.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| git 2.20 | active | — | — |
| git 2.35 | active | — | — |
| git 2.42 | active | — | — |

## Workarounds

1. **First, commit or stash the local changes: git stash push -m 'temp' (or git commit -m 'temp'). Then pop the original stash: git stash pop stash@{1} (adjust index). Finally, restore the temporary stash if needed: git stash pop stash@{0}.** (85% success)
   ```
   First, commit or stash the local changes: git stash push -m 'temp' (or git commit -m 'temp'). Then pop the original stash: git stash pop stash@{1} (adjust index). Finally, restore the temporary stash if needed: git stash pop stash@{0}.
   ```
2. **Use 'git stash branch' to create a new branch from the stash, which avoids conflicts: git stash branch new-branch stash@{0}** (90% success)
   ```
   Use 'git stash branch' to create a new branch from the stash, which avoids conflicts: git stash branch new-branch stash@{0}
   ```

## Dead Ends

- **** — Git stash does not have a force option; the error persists because the conflict is not resolved. (100% fail)
- **** — This loses the local changes permanently without any recovery option. (50% fail)
