git
merge
ai_generated
true
fatal: Not possible to fast-forward, aborting.
ID: git/cannot-fast-forward
96%Fix Rate
97%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 2 | active | — | — | — |
Root Cause
git pull with --ff-only fails because the remote branch has diverged.
genericWorkarounds
-
95% success Use git pull --rebase to replay local commits on top of remote
git pull --rebase origin main — creates linear history
-
90% success Use git pull (merge) if you want a merge commit
git pull origin main — creates a merge commit preserving both histories
Dead Ends
Common approaches that don't work:
-
Using git push -f to overwrite remote
90% fail
Destroys remote history; other collaborators lose work
-
Deleting the local branch and re-checking out
80% fail
Loses local unpushed commits
Error Chain
Frequently confused with: