Skip to main content

One post tagged with "fast-forward"

View All Tags

Fix “fatal - Not possible to fast-forward, aborting.” on Git Pull

· One min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

This error usually appears when your local branch has diverged from the remote, and Git is configured to disallow non-fast-forward merges.


✅ Fix: Use git pull --rebase

git pull --rebase

This will reapply your local commits on top of the remote branch history, avoiding a merge commit.


📍 Alternative: Allow Merges

If you prefer merging instead of rebasing:

git config pull.ff false
git pull

This config allows Git to merge rather than fast-forward.


🔁 TL;DR

git pull --rebase  # preferred

or

git config pull.ff false
git pull

Use rebasing for a cleaner commit history 🚀

TBH my favourite commands are:

git fetch origin // it gets all the updates from the origin
git reset --hard origin/branch_name // replacing your local branch_name with origin version