git错误 error: failed to push some refs to ‘https://github.com/... 由于远程库与本地库的不一致 引起的

https://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.html

报错

可以通过如下命令进行代码合并【注:pull=fetch+merge]

git pull --rebase origin master

再git push

多人开发的话 每次先pull 再开发

有人都要先 commit 再 pull,不然真的会覆盖代码的

git merge 合并指定分支到当前分支

在Mac上利用sourceTree 解决代码合并冲突
https://juejin.cn/post/6844903822016380941

  

posted on 2021-10-18 18:38  左侧岚  阅读(38)  评论(0编辑  收藏  举报

导航