美文网首页
使用git pull提示refusing to merge un

使用git pull提示refusing to merge un

作者: flyween | 来源:发表于2018-11-26 19:17 被阅读0次

    这个问题出现在将本地项目改为git项目的过程中

    将本地项目改为git项目,在当前项目根目录下执行

    git init
    

    线上创建git项目,获取到ssh地址或是http地址,然后指定本地项目的git地址为创建项目的地址

    git remote add xxxx.git
    

    尝试提交代码,初次提交需要先pull,这是就出现了标题的报错 fatal: refusing to merge unrelated histories,执行

    git pull --allow-unrelated-histories
    

    这样即可pull成功

    unreleated histories

    looking for the meaning

    相关文章

      网友评论

          本文标题:使用git pull提示refusing to merge un

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