Updates were rejected because the tip of your current branch is behind 问题出现解决方案

2023-05-25,,

提供如下几种方式:

1.使用强制push的方法(多人协作时不可取):

git push -u origin master -f

2.push前先将远程repository修改pull下来

git pull origin master

git push -u origin master

3.不想merge远程和本地修改,可以先创建新的分支

git branch [name]

git push -u origin [name]

尊重原创,学习自简书.

Updates were rejected because the tip of your current branch is behind 问题出现解决方案的相关教程结束。

《Updates were rejected because the tip of your current branch is behind 问题出现解决方案.doc》

下载本文的Word格式文档,以方便收藏与打印。