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

【git】main|REBASE 2/6

  • 很久没合并代码
  • 合并出现冲突,自动进入了 main|REBASE 2/6 的提示:

【git】main|REBASE 2/6

It looks like you’ve encountered several merge conflicts after a git pull operation while a rebase is in progress. Here’s how you can resolve these conflicts and proceed with your rebase:

Resolve Merge Conflicts Manually:

Open the conflicting files in your code editor.
Look for the conflict markers (<<<<<<<, =======, >>>>>>>). These mark the conflicting changes from the local and remote versions.
Decide how to integrate changes from both sides or choose one side over the other.
After resolving each conflict in a file, save the file.
Mark Conflicts as Resolved:

Use git add for each file you resolve to mark it as resolved. Do not use git commit yet as the rebase process will handle committing for you.
Continue the Rebase:

Once all conflicts are resolved and the files are added, continue the rebase by running:

git rebase --continue

This will apply the next commit in the rebase queue and might result in more conflicts. Repeat the resolution process as needed.
Skip the Problematic Commit (if you decide the commit causing conflicts should not be applied):

You can use:

git rebase --skip

This will ignore the commit that causes the conflict and move to the next commit.
Abort the Rebase (if you decide to return to the original state before the rebase started):

You can abort the rebase which will return your branch to the original state before the rebase started:

git rebase --abort

It’s important to carefully review the changes and ensure that the resolution maintains the integrity and functionality of the code. If the rebase was unintentional or if you’re unsure about how to resolve conflicts, it might be safer to discuss with your team or check with the repository’s main contributor.

我的修复

zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main)
$ git pull
remote: Enumerating objects: 772, done.
remote: Counting objects: 100% (772/772), done.
remote: Compressing objects: 100% (661/661), done.
remote: Total 772 (delta 118), reused 712 (delta 104), pack-reused 0
Receiving objects: 100% (772/772), 25.54 MiB | 10.37 MiB/s, done.
Resolving deltas: 100% (118/118), completed with 9 local objects.dd374ac3..e80e2164  main       -> origin/main
Auto-merging .gitignore
CONFLICT (content): Merge conflict in .gitignore
Auto-merging Bifrost-202403/worker/src/bifrost/experiment_manager/h264_file_data_producer.cpp
CONFLICT (content): Merge conflict in Bifrost-202403/worker/src/bifrost/experiment_manager/h264_file_data_producer.cpp
warning: Cannot merge binary files: player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.lib (HEAD vs. 4db9a18e (同步13900k的修改,主要合并了player-only、2403版本的wsl2调试))
Auto-merging player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.lib
CONFLICT (content): Merge conflict in player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.lib
Auto-merging player-only/worker/third_party/libwebrtc/libwebrtc/modules/pacing/paced_sender.cc
error: could not apply 4db9a18e... 同步13900k的修改,主要合并了player-only、2403版本的wsl2调试
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 4db9a18e... 同步13900k的修改,主要合并了player-only、2403版本的wsl2调试zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$ git rebase --continue
Auto-merging .gitignore
CONFLICT (content): Merge conflict in .gitignore
error: could not apply 0c2cdc98... 忽略俩264文件
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 0c2cdc98... 忽略俩264文件zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 3/6)
$ git rebase --continue
.gitignore: needs merge
You must edit all merge conflicts and then
mark them as resolved using git addzhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 3/6)
$ git rebase --continue
[detached HEAD 2a348e6d] 忽略俩264文件1 file changed, 3 insertions(+), 1 deletion(-)
CONFLICT (modify/delete): player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.pdb deleted in f466da41 (abseil的m77版本的absl不上传) and modified in HEAD.  Version HEAD of player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.pdb left in tree.
error: could not apply f466da41... abseil的m77版本的absl不上传
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply f466da41... abseil的m77版本的absl不上传zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 6/6)
$ git rebase --continue
player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.pdb: needs merge
You must edit all merge conflicts and then
mark them as resolved using git addzhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 6/6)
$ git rebase --abortzhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main)
$

重新push pull:刚才的修改都丢失了


zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main)
$ git push! [rejected]          main -> main (non-fast-forward)hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main)
$ git pull
Auto-merging .gitignore
CONFLICT (content): Merge conflict in .gitignore
Auto-merging Bifrost-202403/worker/src/bifrost/experiment_manager/h264_file_data_producer.cpp
CONFLICT (content): Merge conflict in Bifrost-202403/worker/src/bifrost/experiment_manager/h264_file_data_producer.cpp
warning: Cannot merge binary files: player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.lib (HEAD vs. 4db9a18e (同步13900k的修改,主要合并了player-only、2403版本的wsl2调试))
Auto-merging player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.lib
CONFLICT (content): Merge conflict in player-only/worker/third_party/libwebrtc/deps/abseil-cpp/abseil-cpp_m77/out32/Debug/absl.lib
Auto-merging player-only/worker/third_party/libwebrtc/libwebrtc/modules/pacing/paced_sender.cc
error: could not apply 4db9a18e... 同步13900k的修改,主要合并了player-only、2403版本的wsl2调试
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 4db9a18e... 同步13900k的修改,主要合并了player-only、2403版本的wsl2调试zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$ ^Czhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$

本地修改后后强制覆盖线上版本

如果你想要在Git中强制使用本地的更改覆盖远程仓库的更改(例如在解决合并冲突后),你可以使用以下步骤来强制推送:

确保你的本地分支已正确设置: 确保你已经解决了所有合并冲突,并且你的本地分支包含了所有你希望在远程仓库中有的更改。

使用强制推送: 强制推送会使远程分支与你的本地分支同步,即使这意味着覆盖在远程分支上的更改。使用以下命令进行强制推送:

bash
复制代码
git push origin --force
或者使用更安全的方式,只强制推送你的当前分支:

bash
复制代码
git push --force-with-lease
这个命令在远程分支没有被其他人更新的情况下执行推送,这是一种更安全的做法,可以防止无意中覆盖其他人的更改。

警告:
强制推送是一个危险的操作,因为它会永久覆盖远程仓库中的更改。在进行强制推送前,最好确认与你的团队或项目的贡献者。
确保你理解强制推送会使远程仓库丢失所有未合并的更改。
通常,如果不是在个人项目或在确保所有团队成员都同意的情况下,应避免使用强制推送。
在团队环境中,建议在执行此类操作前进行充分的沟通。

我的操作


zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$ git push --force-with-lease
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, usegit push origin HEAD:<name-of-remote-branch>zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$ git push -^Corce-with-leasezhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main|REBASE 2/6)
$ git rebase --abortzhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main)
$ git push --force-with-lease
Enumerating objects: 123, done.
Counting objects: 100% (123/123), done.
Delta compression using up to 32 threads
Compressing objects:  98% (76/77)
Compressing objects: 100% (77/77), done.
Writing objects: 100% (81/81), 2.61 MiB | 5.65 MiB/s, done.
Total 81 (delta 54), reused 2 (delta 1), pack-reused 0
remote: Powered by GITEE.COM [1.1.5]
remote: Set trace flag 8545d1b1+ e80e2164...f466da41 main -> main (forced update)zhangbin@DESKTOP-1723CM1 MINGW64 /d/XTRANS/thunderbolt/ayame/zhb-bifrost (main)
$

相关文章:

【git】main|REBASE 2/6

很久没合并代码合并出现冲突&#xff0c;自动进入了 main|REBASE 2/6 的提示: 【git】main|REBASE 2/6 It looks like you’ve encountered several merge conflicts after a git pull operation while a rebase is in progress. Here’s how you can resolve these conflict…...

51单片机的水质检测系统【proteus仿真+程序+报告+原理图+演示视频】

1、主要功能 该系统由AT89C51/STC89C52单片机LCD1602显示模块温度传感器ph传感器浑浊度传感器蓝牙继电器LED、按键和蜂鸣器等模块构成。适用于水质监测系统&#xff0c;含检测和调整水温、浑浊度、ph等相似项目。 可实现功能: 1、LCD1602实时显示水温、水体ph和浑浊度 2、温…...

【python面试宝典7】线程池,模块和包

目录标 题目37&#xff1a;解释一下线程池的工作原理。题目38&#xff1a;举例说明什么情况下会出现KeyError、TypeError、ValueError。题目39&#xff1a;说出下面代码的运行结果。题目40&#xff1a;如何读取大文件&#xff0c;例如内存只有4G&#xff0c;如何读取一个大小为…...

Android input系统原理二

1.inputmanager启动源码分析 在SystemServer.java中构造了 inputmanagerservice的对象&#xff0c;在其构造函数中&#xff0c;最重要的是这个nativeInit函数。 下面是核心代码 inputManager new InputManagerService(context);public InputManagerService(Context context)…...

Oracle登录报错-ORA-01017: invalid username/password;logon denied

接上文&#xff1a;Oracle创建用户报错-ORA-65096: invalid common user or role name 我以为 按照上文在PDB里创建了用户&#xff0c;我以为就可以用PLSQL远程连接了&#xff0c;远程服务器上也安装了对应版本的Oracle客户端&#xff0c;但是我想多了&#xff0c;客户只是新建…...

JavaScript 获取浏览器本地数据的4种方式

JavaScript 获取浏览器本地数据的方式 我们在做Web开发中&#xff0c;客户端存储机制对于在浏览器中持久化数据至关重要。这些机制允许开发者存储用户偏好设置、应用状态以及其他关键信息&#xff0c;从而增强用户体验。本文将介绍几种常用的JavaScript获取浏览器本地数据的方…...

77寸OLED透明触摸屏有哪些应用场景

说到77寸OLED透明触摸屏&#xff0c;那可真是市场营销中的一大亮点&#xff0c;应用场景多到数不清&#xff01;我这就给你细数几个热门的&#xff1a; 商业展示&#xff1a;这可是77寸OLED透明触摸屏的拿手好戏&#xff01;在高端零售店铺里&#xff0c;它可以作为陈列窗口&am…...

二分解题的奇技淫巧都有哪些,你还不会吗?

先说一下我为什么要写这篇文章。 “二分“ 查找 or ”二分“ 答案的思想大家想必都知道吧&#xff08;如果不懂&#xff0c;可以看一下我之前写的一篇文章&#xff09;。 二分求解 可是呢&#xff1f;思想都会&#xff0c;做题的时候&#xff0c;就懵圈了。 这个题竟然考的是…...

LeetCode-871 最低加油次数

重启力扣每日一题系列&#xff01; 因为过去两个月里掉粉掉的好严重&#xff0c;我想大抵是因为更新的频率不如上半年了&#xff0c;如果我重启了每日一题系列那岂不是至少是每日一更☝&#x1f913;&#xff1f; 也不是每天都更&#xff0c;我有两不更&#xff0c;特难的就不…...

OpenCV-OCR

文章目录 一、OCR技术的基本原理二、OpenCV在OCR识别中的应用1.图像预处理2.文字区域检测3.OCR识别&#xff1a;4.后处理&#xff1a; 三、OCR识别示例代码四、注意事项 OpenCV-OCR主要涉及使用OpenCV库进行光学字符识别&#xff08;OCR&#xff09;的技术。OCR技术可以识别图像…...

Linux卸载mysql

一、查看当前安装mysql情况&#xff0c;查找以前是否装有mysql rpm -qa|grep -i mysql二、停止MySQL服务 三、删除mysql库和文件 查找MySQL库 # 查找命令 find / -name mysql# 显示结果 /var/lib/mysql/var/lib/mysql/mysql/usr/lib64/mysql删除对应的mysql目录 rm -rf /v…...

【大语言模型-论文精读】用于医疗领域摘要任务的大型语言模型评估综述

【大语言模型-论文精读】用于医疗领域摘要任务的大型语言模型评估综述 论文信息&#xff1a; 用于医疗领域摘要任务的大型语言模型评估&#xff1a;一篇叙述性综述&#xff0c; 文章是由 Emma Croxford , Yanjun Gao 博士 , Nicholas Pellegrino , Karen K. Wong 等人近期合作…...

图吧工具箱

图吧工具箱202309绿色版自动解压程序R2.exe&#xff0c;永久有效 链接&#xff1a;https://pan.baidu.com/s/1M6TI7Git8bXOzZX_qZ3LJw?pwdzked 提取码&#xff1a;zked...

vue2 + View design 使用inputNumber设置默认值为undefined但展示数据为1且表单校验不通过的原因

文章目录 一、背景二、操作步骤1.复现前的准备工作&#xff08;1&#xff09;vue版本和view design 版本&#xff08;2&#xff09;创建一个组件&#xff08;组件中根据类型渲染不同的组件&#xff09;&#xff08;3&#xff09;在list.vue页面中引入组件&#xff0c;传入配置&…...

【SpringSecurity】基本流程

【中文文档: Spring Security 中文文档 :: Spring Security Reference】 【英文文档&#xff1a;Spring Security】 以下内容只是记录springsecurity最简单的一种验证流程&#xff0c;所有配置基本都是默认的配置。 引入依赖 <dependency><groupId>org.springf…...

算法-汉诺塔问题(Hanoi tower)

介绍 汉诺塔是源于印度的一个古老传说的小游戏&#xff0c;简单来说就是有三根柱子&#xff0c;开始的时候&#xff0c;第一根柱子上圆盘由大到小&#xff0c;自下往上排列。这个小游戏要实现的目的呢&#xff0c;就是要把第一根柱子上的圆盘移到第三根的柱子上去&#xff1b;…...

HarmonyOS鸿蒙 Next 实现协调布局效果

HarmonyOS鸿蒙 Next 实现协调布局效果 ​ 假期愉快! 最近大A 的涨势实在是红的让人晕头转向&#xff0c;不知道各位收益如何&#xff0c;这会是在路上&#xff0c;还是已经到目的地了? 言归正传&#xff0c;最近有些忙&#xff0c;关于鸿蒙的实践系列有些脱节了&#xff0c;…...

【自然语言处理】(1) --语言转换方法

文章目录 语言转换方法一、统计语言模型1. 词向量转换2. 统计模型问题 二、神经语言模型1. 词向量化2. 维度灾难3. 解决维度灾难4. embedding词嵌入5. Word2Vec技术5.1 连续词袋模型&#xff08;CBOW&#xff09;5.2 跳字模型&#xff08;Skip-gram&#xff09; 总结 语言转换方…...

叉车防撞系统方案,引领安全作业新时代

在现代工业的舞台上&#xff0c;叉车如同忙碌的“搬运工”&#xff0c;在仓储和制造环境中发挥着不可或缺的作用。然而&#xff0c;随着叉车使用频率的不断攀升&#xff0c;安全事故也如影随形&#xff0c;给企业带来经济损失的同时&#xff0c;更严重威胁着操作人员的生命安全…...

Nginx的核心架构和设计原理

Nginx 是一个免费的、开源的、高性能 Http 服务器和反向代理。Nginx 的架构设计是为了提供高性能、稳定性和可扩展性。 Nginx 的主要架构组件和工作原理&#xff1a; 1、Master 进程&#xff1a;Nginx 的运行始于一个 master 进程&#xff0c;它负责管理所有的工作进程。mast…...

golang循环变量捕获问题​​

在 Go 语言中&#xff0c;当在循环中启动协程&#xff08;goroutine&#xff09;时&#xff0c;如果在协程闭包中直接引用循环变量&#xff0c;可能会遇到一个常见的陷阱 - ​​循环变量捕获问题​​。让我详细解释一下&#xff1a; 问题背景 看这个代码片段&#xff1a; fo…...

智慧工地云平台源码,基于微服务架构+Java+Spring Cloud +UniApp +MySql

智慧工地管理云平台系统&#xff0c;智慧工地全套源码&#xff0c;java版智慧工地源码&#xff0c;支持PC端、大屏端、移动端。 智慧工地聚焦建筑行业的市场需求&#xff0c;提供“平台网络终端”的整体解决方案&#xff0c;提供劳务管理、视频管理、智能监测、绿色施工、安全管…...

QMC5883L的驱动

简介 本篇文章的代码已经上传到了github上面&#xff0c;开源代码 作为一个电子罗盘模块&#xff0c;我们可以通过I2C从中获取偏航角yaw&#xff0c;相对于六轴陀螺仪的yaw&#xff0c;qmc5883l几乎不会零飘并且成本较低。 参考资料 QMC5883L磁场传感器驱动 QMC5883L磁力计…...

Swift 协议扩展精进之路:解决 CoreData 托管实体子类的类型不匹配问题(下)

概述 在 Swift 开发语言中&#xff0c;各位秃头小码农们可以充分利用语法本身所带来的便利去劈荆斩棘。我们还可以恣意利用泛型、协议关联类型和协议扩展来进一步简化和优化我们复杂的代码需求。 不过&#xff0c;在涉及到多个子类派生于基类进行多态模拟的场景下&#xff0c;…...

C++ 基础特性深度解析

目录 引言 一、命名空间&#xff08;namespace&#xff09; C 中的命名空间​ 与 C 语言的对比​ 二、缺省参数​ C 中的缺省参数​ 与 C 语言的对比​ 三、引用&#xff08;reference&#xff09;​ C 中的引用​ 与 C 语言的对比​ 四、inline&#xff08;内联函数…...

MySQL 8.0 OCP 英文题库解析(十三)

Oracle 为庆祝 MySQL 30 周年&#xff0c;截止到 2025.07.31 之前。所有人均可以免费考取原价245美元的MySQL OCP 认证。 从今天开始&#xff0c;将英文题库免费公布出来&#xff0c;并进行解析&#xff0c;帮助大家在一个月之内轻松通过OCP认证。 本期公布试题111~120 试题1…...

C++ 求圆面积的程序(Program to find area of a circle)

给定半径r&#xff0c;求圆的面积。圆的面积应精确到小数点后5位。 例子&#xff1a; 输入&#xff1a;r 5 输出&#xff1a;78.53982 解释&#xff1a;由于面积 PI * r * r 3.14159265358979323846 * 5 * 5 78.53982&#xff0c;因为我们只保留小数点后 5 位数字。 输…...

代码随想录刷题day30

1、零钱兑换II 给你一个整数数组 coins 表示不同面额的硬币&#xff0c;另给一个整数 amount 表示总金额。 请你计算并返回可以凑成总金额的硬币组合数。如果任何硬币组合都无法凑出总金额&#xff0c;返回 0 。 假设每一种面额的硬币有无限个。 题目数据保证结果符合 32 位带…...

return this;返回的是谁

一个审批系统的示例来演示责任链模式的实现。假设公司需要处理不同金额的采购申请&#xff0c;不同级别的经理有不同的审批权限&#xff1a; // 抽象处理者&#xff1a;审批者 abstract class Approver {protected Approver successor; // 下一个处理者// 设置下一个处理者pub…...

力扣热题100 k个一组反转链表题解

题目: 代码: func reverseKGroup(head *ListNode, k int) *ListNode {cur : headfor i : 0; i < k; i {if cur nil {return head}cur cur.Next}newHead : reverse(head, cur)head.Next reverseKGroup(cur, k)return newHead }func reverse(start, end *ListNode) *ListN…...