GIT致命:拒绝合并无关的历史 [英] GIT Fatal : refusing to merge unrelated histories
问题描述
我看到:
$ git pull origin master
从https://bitbucket.org/tecgenome/ chl-v2.0-html
*分支大师 - > FETCH_HEAD
fatal:拒绝合并无关的历史
如何避免或避免错误消息?
自从Git 2.9 (2016年4月),你可以尝试:
git pull --allow-unrelated-history来源大师
但是请检查为什么这些分支不再常见,但是。 在这种情况下,如果您没有自己的本地提交,最好将您的分支重置为新的分支: I see: How can I avoid or get past that error message? Since Git 2.9 (April 2016), you can try: But check why those branches are no longer common though. In which case, if you don't have local commits of your own, it is best to reset your branch to the new one:
这篇关于GIT致命:拒绝合并无关的历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
可能有一个强制推式重写全部
git fetch
git reset --hard origin / master
$ git pull origin master
From https://bitbucket.org/tecgenome/chl-v2.0-html
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
git pull --allow-unrelated-histories origin master
May be there was a force push rewritting all the history of origin/master
.git fetch
git reset --hard origin/master