fatal: refusing to merge unrelated histories(git)

首先看报错

       拒绝合并

      从而造成拉取失败,原因是本地和远程仓库不同,这个时候可以在pull的时候加上

       --allow-unrelated-histories  这句代码是在git 2.9.2版本发生的

  假如我们的源是origin,分支是dev,那么我们 需要这样写git pull origin dev ----allow-unrelated-histories

      我们要知道,我们的源可以是本地的路径

猜你喜欢

转载自blog.csdn.net/qq_38363371/article/details/78717320
今日推荐