美文网首页
git fatal: 拒绝合并无关的历史的错误解决

git fatal: 拒绝合并无关的历史的错误解决

作者: 笨笨翔 | 来源:发表于2019-09-25 10:10 被阅读0次
本地初始化的项目 与 github 版本不一致, 导致无法提交
 
$ git pull origin master
 * branch            master     -> FETCH_HEAD
fatal: 拒绝合并无关的历史
解决方法
 
在pull 时候, 添加–allow-unrelated-histories参数 即可.
 
$ git pull origin master --allow-unrelated-histories                   
来自 https://github.com/itaken/python-login-demo
 * branch            master     -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 LICENSE | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 LICENSE

相关文章

网友评论

      本文标题:git fatal: 拒绝合并无关的历史的错误解决

      本文链接:https://www.haomeiwen.com/subject/kyiquctx.html