Git pull – refusing to merge unrelated histories
Add --allow-unrelated-histories
to solve the Git fatal error – “refusing to merge unrelated histories”
Terminal
$ git pull origin master
From https://github.com/mkyong/java-concurrency
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
To fix it :
Terminal
$ git pull origin master --allow-unrelated-histories
From https://github.com/mkyong/java-concurrency
* branch master -> FETCH_HEAD
Merge made by the 'recursive' strategy.
LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 674 insertions(+)
create mode 100644 LICENSE
But what does the error mean? I assume there might be times when we do not want to allow unrelated histories and that is why it is issuing the message.
Thanks!