# 错误：您对以下文件的本地更改将被合并覆盖：
	file.txt
请在合并之前提交您的更改或将其 stash。

- **ID:** `git/stash-conflict-on-pop`
- **领域:** git
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

在工作目录有未提交的更改且与 stash 中的更改冲突时运行 'git stash pop'。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| git 2.20 | active | — | — |
| git 2.35 | active | — | — |
| git 2.42 | active | — | — |

## 解决方案

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}.
   ```
2. ```
   Use 'git stash branch' to create a new branch from the stash, which avoids conflicts: git stash branch new-branch stash@{0}
   ```

## 无效尝试

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