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 clean3.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用来强制覆盖已有的分支。成功解决

评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论