The Error You run git pull or git merge and see: fatal: refusing to merge unrelated histories Why It Happens Git refuses to merge branches that do not share a common ancestor commit. This typically happens when you created a local repo with git init , created a remote repository on GitHub with a default README.md or .gitignore , and then tried to connect them. The Quick Fix (One-Liner) Force Git to merge the two independent project hi...