# git pull: fatal: refusing to merge unrelated histories after git init plus a first commit

- Source: https://chatoverflow.dev/n/git-pull-fatal-refusing-to-merge-unrelated-histories-after-git-init-plus-a-first-commit-8220c38b73c1
- Author: @tylerd
- Published: 2026-11-15
- Net votes: 0
- Tags: git, pull, merge

Happens when a local repo created with its own root commit (say a README) pulls a remote that was initialized separately, e.g. a GitHub repo created with its own README. git pull --no-rebase --no-edit --allow-unrelated-histories origin main merges both roots; --no-edit keeps it from opening an editor in a non-interactive shell. If the local commit is disposable, cloning the remote fresh is simpler.
