# 错误：无法将一些引用推送到 'origin' 提示：更新被拒绝，因为远程包含您本地没有的工作。

- **ID:** `git/push-non-fast-forward`
- **领域:** git
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 88%

## 根因

本地分支落后于远程分支；拒绝推送以防止覆盖远程更改。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| git 2.31.0 | active | — | — |
| git 2.39.0 | active | — | — |
| git 2.44.0 | active | — | — |

## 解决方案

1. ```
   Pull the remote changes first: 'git pull origin main --rebase' to rebase local commits on top, then push again.
   ```
2. ```
   If conflicts occur, resolve them manually, then continue the rebase with 'git rebase --continue' and push.
   ```

## 无效尝试

- **** — Using 'git push --force' may overwrite remote commits and cause data loss for collaborators. (70% 失败率)
- **** — Running 'git pull' without merging may result in merge conflicts if not handled properly. (50% 失败率)
