The “fatal: refusing to merge unrelated histories” Git error

The “fatal: refusing to merge unrelated histories” Git error occurs when two unrelated projects are merged (i.e., projects that are not aware of each other’s existence and have mismatching commit histories).

The error is resolved by toggling the allow-unrelated-histories switch. After a git pull or git merge command, add the following tag:

git pull origin master --allow-unrelated-histories

More information can be found here, ​ on Git’s official documentation.

https://git-scm.com/docs

The “fatal: refusing to merge unrelated histories” Git error

You May Also Like