git pull上传问题

  • windows下使用git终端上传文件,执行命令git push -u origin master后出现如下错误:

    • 1
      2
      3
      4
      5
      6
      7
      To https://github.com/wangxianggit/PythonDSP.git
      ! [rejected] master -> master (non-fast-forward)
      error: failed to push some refs to 'https://github.com/wangxianggit/PythonDSP.git'
      hint: Updates were rejected because a pushed branch tip is behind its remote
      hint: counterpart. Check out this branch and 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.
    • 原因:github上的版本里有readme文件和本地版本冲突

    • 使用强制覆盖命令解决冲突:

    • 1
      git push -u origin master