git提交文件时报错解决

git提交文件时报错解决

他的猫
2021-07-29 / 0 评论 / 20 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2021年07月29日,已超过123天没有更新,若内容或图片失效,请留言反馈。

输入

git push -u origin master

命令时报错如下:

To github.com:yyy1314/tiaodonyun.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'github.com:yyy1314/tiaodonyun.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.

解决方法 运行:

git push --set-upstream origin master

问题解决!

0

评论 (0)

取消