Git: refusing to merge unrelated histories
Table of Contents
Most recently, I found the following error during a git operation: {% highlight bash %} $ git pull fatal: refusing to merge unrelated histories {% endhighlight %}
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 (kudos to the git developers for the obvious message!). This change (and many others) can be found here.
The fix (for me) was found in doing the following:
{% highlight bash %} $ git pull –allow-unrelated-histories {% endhighlight %}
I suppose that this is relevant if you are concerned about “related” history.