git上传代码报错:hint: Updates were rejected because a pushed branch tip is behind its remote hint: counter

1.报错
error: failed to push some refs to ‘http://xxx/backend.git’
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.
 

解决办法:

第一步:git pull --rebase origin master 

第二步:git rebase --continue

第三步:git push origin master / git push -u origin master

猜你喜欢

转载自blog.csdn.net/weixin_43550562/article/details/127115391