美文网首页
git推送失败解决方案 rejected

git推送失败解决方案 rejected

作者: 骚包霸天虎 | 来源:发表于2017-12-08 18:26 被阅读0次

$ git push之后提交不成功 出现如下错误
To https://gitee.com/smilemuffie/pix.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/smilemuffie/pix.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.

image.png

解决步骤

  1. git status -s 查看状态
    image.png
  2. git add -u 将冲突文件 resolved 掉
  3. git commit -m 'xxxxxxxxx'
  4. git push

相关文章

网友评论

      本文标题:git推送失败解决方案 rejected

      本文链接:https://www.haomeiwen.com/subject/xjcyixtx.html