推送到远程仓库

git push -u origin master

出现如下错误

 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'git@github.com:qiyuebuku/WxRobot.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.

解决方法就是在push到远程服务器之前,先将本地仓库的变化连接到远程仓库主分支

git pull origin master 

git push -u origin master //把本地仓库的文件推送到远程仓库wen

  

问题解决

相关文章:

  • 2021-07-10
  • 2021-12-12
  • 2022-12-23
  • 2021-05-17
  • 2018-01-14
猜你喜欢
  • 2022-12-23
  • 2021-07-08
  • 2021-04-26
  • 2021-07-14
  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
相关资源
相似解决方案