github提交code各种报错

下面记录一些我git提交code时常见的错误以及对应的解决方法!

  1. 本地没有update到最新版本的项目(git上有README.md文件没下载下来),本地直接push所以会出错。
1
2
3
4
5
6
7
8
9
$ git push -u origin master
To https://github.com/yesong17/hexo.github.io
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/yesong17/hexo.github.io'
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.

giterror1

解决:

最后更新: 2020年03月14日 11:01

原始链接: https://yesong17.github.io/2020/03/14/111/

× 请我吃大餐~
打赏二维码