zoukankan      html  css  js  c++  java
  • 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

    推送到远程仓库

    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

      

    问题解决

  • 相关阅读:
    poj1862---变形虫(贪心)
    poj1833---字典序算法
    poj1799---解析几何
    poj1665
    poj1663---纯粹找规律
    poj1658
    poj1657---chessboard
    poj1656---数黑格子
    poj1617---columnar encryption
    查找两个文件的相同之处,不同之处
  • 原文地址:https://www.cnblogs.com/qybk/p/10880901.html
Copyright © 2011-2022 走看看