gitee上传失败问题

error: failed to push some refs to 'https://gitee.com/herryxm/hhgolbalk3.git' 
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 orgin master时报如上错误,原因是远程仓库中有修改没有同步到本地仓库中。我的情况是远程仓库不为空,创建时新增了readme文件。,可以执行:

git pull --rebase origin master或 

git pull --allow-unrelated-histories

 

后在执行git push origin master,成功。

posted @ 2022-11-28 15:06  herry507  阅读(24)  评论(0编辑  收藏  举报