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

63次阅读

共计 553 个字符,预计需要花费 2 分钟才能阅读完成。

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 用来强制笼罩已有的分支。胜利解决

正文完
 0