git: Updates were rejected because the tip of your current branch is behind

一、报错含义

由于本地分支的tip落后远程分支,push操作被拒绝。
git: Updates were rejected because the tip of your current branch is behind_第1张图片

二、产生原因

我再本地拉去了新的分支并未同步到远程仓库,在新分支进行开发,由于前几天同步也创建了该分支并同步到了远程仓库,导致我本次push失败

三、解决方案

在本地分支git pull操作给出了解决方案
git: Updates were rejected because the tip of your current branch is behind_第2张图片
执行git pull

git pull origin 分支名

再次push成功

你可能感兴趣的:(【版本管理工具git】,git)