Git push Updates were rejected because the tip of your current branch is behind

git push 出现 Updates were rejected because the tip of your current branch is behind 提示。
git pull
或
git pull remote branch

推送失败,本地仓库的版本滞后远程仓库,通过git pull更新本地仓库,如果存在冲突,还需要先解决冲突然后提交最后再推送。

将远程存储库的更改合并到当前分支中。默认模式下,git pull是git fetch和git merge FETCH_HEAD的缩写。

更准确地说,git pull使用给定的参数运行git fetch,并调用git merge将检索到的分支头合并到当前分支中。
使用--rebase,运行git rebase而不是git merge。

参考:https://git-scm.com/docs/git-pull

git