当前位置: 首页 > news >正文

试图将更改推送到 GitHub,但是远程仓库已经包含了您本地没有的工作(可能是其他人提交的修改)

        这通常是由于其他人或其他仓库推送到了相同的分支上,导致您的本地仓库和远程仓库之间存在冲突。

错误信息:

To github.com:8upersaiyan/CKmuduo.git ! [rejected] main -> main (fetch first) error: failed to push some refs to 'github.com:8upersaiyan/CKmuduo.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 config --global pull.rebase true  # 设置默认为变基策略

git pull origin main #从远程同步到本地

解决完远程同步到本地的问题,在解决从本地到网络的同步:

使用:

git add .
git commit -m "解决冲突并更新"
git push origin main

把本地的修改推送到网络上。 

http://www.lryc.cn/news/114047.html

相关文章:

  • Lamport向量时钟算法的C++实现:在分布式系统中生成事件的部分排序并检测因果关系违规
  • 多个excel的sheet合并到一个excel下
  • 【Fegin技术专题】「原生态」打开Fegin之RPC技术的开端,你会使用原生态的Fegin吗?(中)
  • leetcode--每日一题--822--344(使用异或来进行数据交换)
  • OpenStreetMap数据转3D场景【Python + PostgreSQL】
  • 动力节点|MyBatis入门实战到深入源码
  • 分布式规则引擎框架的设计
  • C#开发FFMPEG例子(API方式) FFmpeg推送udp组播流
  • nvm下载node导致npm报错无法使用
  • LeetCode 热题 100JavaScript--2. 两数相加
  • zookeeper总结
  • 【程序环境与预处理玩转指南】
  • 搭建简易syslog日志中转服务器
  • MongoDB文档-进阶使用-spring-boot整合使用MongoDB---MongoRepository完成增删改查
  • 什么是线程局部变量?
  • Jmeter响应中的乱码问题
  • MongoDB文档-进阶使用-MongoDB索引-createindex()与dropindex()-在MongoDB中使用正则表达式来查找
  • CentOS下ZLMediaKit的可视化管理网站MediaServerUI使用
  • 回归预测 | MATLAB实现POA-CNN-BiGRU鹈鹕算法优化卷积双向门控循环单元多输入单输出回归预测
  • Rust 原生支持龙架构指令集
  • 为生成式AI提速,亚马逊云科技Amazon EC2 P5满足GPU需求
  • 聊聊企业数据安全那些事~
  • 日常随笔——如何把excel题库转换为word打印格式
  • SpringCloud项目打包注意事项以及可能出错的几种情况
  • ZABBIX 6.4 Mysql数据库分表
  • 多线程-Runable和Callable的区别
  • 智慧城市规划新引擎:探秘数字孪生中的二维与三维GIS技术差异
  • Python入门自学进阶-Web框架——38、redis、rabbitmq、git
  • 论 SoC上的Linux如何拉动外部I/O
  • SpringBoot项目如何部署SSL证书 (JKS格式)