Skip to main content

3 posts tagged with "git"

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

Git Rebase Onto Main (Full Guide, No Fluff)

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

You want to bring your feature branch up to date with the latest main, but you don’t want messy merge commits.

The solution: rebase.

Rebase reapplies your local commits on top of the latest main from remote. It keeps your commit history clean, linear, and easy to read — especially when preparing a pull request.