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

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 失败问题)