Interview Prep/Git & GitHub/Merge and Rebase Problems

`fatal: Not possible to fast-forward, aborting.`

BeginnerTroubleshootingMerge and Rebase Problems
Answer

Likely causes → pull.ff=only (or --ff-only) is set, and your local branch has commits that the remote does not.

Diagnose → git fetch && git status -sb shows ahead and behind counts.

Fix → Pick how to integrate: git pull --rebase or git merge origin/main. If your local commits are junk, git reset --hard origin/main.

Prevent → ff-only is a good setting, because it makes you choose consciously.

All Git & GitHub questions Roadmap: Git & GitHub

More on Merge and Rebase Problems