关于gitlab:Error-failed-to-push-some-refs-to-while-run-git-push

Bug问题:

Gitlab提交branch遇到:

1.git add .
2.git commit -m "commit"
显示无误:

On branch rem_useless_require
nothing to commit, working tree clean

3.git push origin rem_useless_require
却显示:

To gitlab.****
 ! [rejected]        rem_useless_require -> rem_useless_require (non-fast-forward)
error: failed to push some refs to '****'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决办法:

第三步执行git push -u origin rem_useless_require -f用来强制笼罩已有的分支。胜利解决

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理