To https://gitee.com/YuJian11/layedit.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/YuJian11/layedit.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first 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提交代码发现上面这个错误,解决方法:
将线上、线下代码进行合并:
git pull --rebase origin master
我这里是master分支,还可以是其他分支。
然后再进行push即可:
git push origin master
文章评论(0)