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

提供如下几种方式:

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


下一篇:[git] Updates were rejected because the tip of your current branch is behind its remote counterpart.