Git refusing to merge unrelated histories
嘻嘻发布于2019-09-29
浏览在git操作之后添加“–allow-unrelated-histories ”,可以解决没有历史的相关的操作如,git pull,git merge,git rebase等。
Terminal
`$ git pull origin master
From https://github.com/mkyong/java-concurrency
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
Copy
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