Sunday, December 1, 2019

Git: refusing to merge unrelated histories

Most recently, I found the following error during a git operation:
 
   $ git pull
   fatal: refusing to merge unrelated histories

which led me to a hunt. I found out that since version 2.9.0, git has removed the ability to merge branches with unrelated histories (thanks for the obvious message Git). This change (and many others) can be found here.


The fix (for me) was found in doing the following:
 
   $ git pull --allow-unrelated-histories

I suppose that this is relevant if you are concerned about "related" history.

No comments: