The reason of fatal refusing to merge unrelated histories
OriginalMarch 1, 2019Less than 1 minute
Caption
Warning
Sometimes an error occurs when pulling or merging: fatal: refusing to merge unrelated histories.
Solution:
git merge origin/master --allow-unrelated-historiesThe result is as follows:
$ git merge origin/master --allow-unrelated-histories
Already up to date!
Merge made by the 'recursive' strategy.Just add --allow-unrelated-histories at the end of the command, which tells Git to allow unrelated histories to merge.