git本地与云端不一致时文件的提交
发布日期:2021-07-01 04:00:41 浏览次数:3 分类:技术文章

本文共 597 字,大约阅读时间需要 1 分钟。

执行push出现问题:

git push origin master

此时报错信息如下:

! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/xxxxxxx/xxxxxxx.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.

解决思路

① 同步云端到本地,取消两者差异
② 重新push到云端

解决方案

#方案1git pull origin master --allow-unrelated-historiesgit add xxx #添加差异文件git push origin master#方案2:强制上传git push -f origin master

转载地址:https://miracle.blog.csdn.net/article/details/105899134 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Qt学习第4天:TCP/UDP通信 【笔记】
下一篇:Qt学习第7天:Qt中常用的快捷键【笔记】

发表评论

最新留言

不错!
[***.144.177.141]2024年04月18日 12时00分24秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章