git push 提交出现 failed to push some refs to
程序员文章站
2022-03-23 11:19:07
问题描述$ git push -u origin mastererror: failed to push some refs to 'codechina.csdn.net:BAR_WORKSHOP/topopt-in-matlab.git'hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused by another r...
问题描述
$ git push -u origin master
error: failed to push some refs to 'codechina.csdn.net:BAR_WORKSHOP/topopt-in-matlab.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.
原因
github中的README.md文件不在本地目录中。
解决方法
git pull --rebase origin master
先运行上面这条命令,可以看到本地目录中多了README.md文件,这时候再push就不会出错了。
git push -u origin master
本文地址:https://blog.csdn.net/BAR_WORKSHOP/article/details/108582506
推荐阅读
-
git push异常整理 error: failed to push some refs to
-
git push origin master 异常 error: failed to push some refs to ‘https://gitee.com/...
-
error: failed to push some refs to
-
Git push时报错 ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to......
-
git push 提交出现 failed to push some refs to
-
push时git报错 error: failed to push some refs to 'git@gitee.com:git_zn/jianli.git' 解决办法
-
解决git push时出现Failed to connect to github.com port 443: Timed out
-
git push 提交出现 fatal: Authentication failed for
-
Git push时报错 ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to......
-
git使用报错 ! [rejected] master -> master (fetch first) error: failed to push some refs to '略‘