两种情况 1.第一次提交检出的,因为两个分支没有关联,在原有命令后加–allow-unrelated-histories //提交 git push 仓库别名 分支 --allow-unrelated-histories //捡出 git pull 仓库别名 分支 --allow-unrelated-histories 2.已经进行过git操作的,已经有关联的 //获取远程dev分支的修改 git fetch 仓库别名 分支 // 合并远程dev分支 git merge 仓库别名 分支 // 更新本地的代码 git pull 仓库别名 分支