美文网首页
Git 强制覆盖本地文件,解决 pull 失败问题

Git 强制覆盖本地文件,解决 pull 失败问题

作者: 兵卒甲 | 来源:发表于2020-01-17 10:23 被阅读0次

pull报错:

* branch            master     -> FETCH_HEAD
* [new branch]      master     -> origin/master
fatal: refusing to merge unrelated histories

git did not exit cleanly (exit code 128) (4469 ms @ 2020-01-17 11:13:35)

解决办法:

  1. 使用fetch命令强制更新:

    $git fetch --all
    $git reset --hard origin/master
    $git pull
    

相关文章

网友评论

      本文标题:Git 强制覆盖本地文件,解决 pull 失败问题

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