1. 程式人生 > >Updates were rejected because the tip of your current branch is behind 問題出現解決方案

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]

 

尊重原創,學習自簡書.