【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
很久没合并代码合并出现冲突,自动进入了 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、按键和蜂鸣器等模块构成。适用于水质监测系统,含检测和调整水温、浑浊度、ph等相似项目。 可实现功能: 1、LCD1602实时显示水温、水体ph和浑浊度 2、温…...

【python面试宝典7】线程池,模块和包
目录标 题目37:解释一下线程池的工作原理。题目38:举例说明什么情况下会出现KeyError、TypeError、ValueError。题目39:说出下面代码的运行结果。题目40:如何读取大文件,例如内存只有4G,如何读取一个大小为…...

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

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

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

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

二分解题的奇技淫巧都有哪些,你还不会吗?
先说一下我为什么要写这篇文章。 “二分“ 查找 or ”二分“ 答案的思想大家想必都知道吧(如果不懂,可以看一下我之前写的一篇文章)。 二分求解 可是呢?思想都会,做题的时候,就懵圈了。 这个题竟然考的是…...

LeetCode-871 最低加油次数
重启力扣每日一题系列! 因为过去两个月里掉粉掉的好严重,我想大抵是因为更新的频率不如上半年了,如果我重启了每日一题系列那岂不是至少是每日一更☝🤓? 也不是每天都更,我有两不更,特难的就不…...

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

Linux卸载mysql
一、查看当前安装mysql情况,查找以前是否装有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…...

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

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

vue2 + View design 使用inputNumber设置默认值为undefined但展示数据为1且表单校验不通过的原因
文章目录 一、背景二、操作步骤1.复现前的准备工作(1)vue版本和view design 版本(2)创建一个组件(组件中根据类型渲染不同的组件)(3)在list.vue页面中引入组件,传入配置&…...

【SpringSecurity】基本流程
【中文文档: Spring Security 中文文档 :: Spring Security Reference】 【英文文档:Spring Security】 以下内容只是记录springsecurity最简单的一种验证流程,所有配置基本都是默认的配置。 引入依赖 <dependency><groupId>org.springf…...
算法-汉诺塔问题(Hanoi tower)
介绍 汉诺塔是源于印度的一个古老传说的小游戏,简单来说就是有三根柱子,开始的时候,第一根柱子上圆盘由大到小,自下往上排列。这个小游戏要实现的目的呢,就是要把第一根柱子上的圆盘移到第三根的柱子上去;…...

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

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

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

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

leetcode35--搜索插入位置--二分查找刷题
搜索插入位置 一共会出现下面四种情况: 目标值在数组所有元素之前 目标值等于数组中某一个元素 目标值插入数组中的位置 目标值在数组所有元素之后 首先在二分查找的代码之前处理掉目标值在数组所有元素之前和之后的情况如果目标值在数组中的某个位置,…...

Django对接支付宝沙箱环境(2024年9月新测有效)
1、申请沙箱环境 #需要填一些个人信息 https://opendocs.alipay.com/ 2、使用支付宝登入,并进入控制台,进入开发者工具推荐-->沙箱 3、获取基本信息 主要是APPID,和支付宝网关地址 4、生成应用私钥和应用公钥和支付宝公钥 上面的接口加签方式选择…...

【MySQL】-- 库的操作
文章目录 1. 查看数据库1.1 语法 2. 创建数据库2.1 语法2.2 示例2.2.1 创建一个名为java114的数据库2.2.2 创建数据库java114,如果数据库不存在则创建2.2.3 查看警告信息 3. 字符集编码和校验(排序)规则3.1 查看数据库支持的字符集编码3.2 查…...

linux桌面软件(wps)内嵌到主窗口后的关闭问题
程序测试环境是:slackware系统,属于linux系统,有桌面(Xface Session)。系统镜像是:slackware64-15.0-install-dvd.iso。qt、c代码实现。 问题描述:延续上一篇文章,将wps软件窗口内嵌…...

WindowsTerminal 美化-壁纸随机更换
目录 一. 相关网址二. 壁纸随机更换思路三. 指定 WindowsTermina 壁纸路径四. 编写脚本,随机替换壁纸4.1 powershell脚本4.2 .bat批处理脚本 四. 配置定时任务,添加触发器五. 效果 一. 相关网址 官方下载 Windows Terminal 官方Github微软商店 美化 Oh …...

iOS 多次获取图片主题色不一样
一个需求中,要求获取图片的主题色 代码如下 -(void)kk_getImage:(UIImage *)image fetchthemeColor:(void(^)(UIColor *color))callBack {dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{// 第一步 先把图片缩小 加快计算速度.…...

UE5 武器IK瞄准系统
创建空项目 创建基础蓝图类My_GameMode,My_HUD,My_PlayChar,My_PlayController 项目设置地图模式 近裁平面 0.1 My_PlayChar蓝图中添加摄像机,角色骨骼网格体,武器骨骼网格体 编辑角色骨骼,预览控制器使用特定动画,动画选择ANM_ark-47-Idle hand_r 添加插槽WeaponMes…...

①EtherCAT转ModbusTCP, EtherCAT/Ethernet/IP/Profinet/ModbusTCP协议互转工业串口网关
EtherCAT/Ethernet/IP/Profinet/ModbusTCP协议互转工业串口网关https://item.taobao.com/item.htm?ftt&id822721028899 协议转换通信网关 EtherCAT 转 ModbusTCP GW系列型号 MS-GW15 简介 MS-GW15 是 EtherCAT 和 Modbus TCP 协议转换网关,为用户提供一种 …...

在macOS上进行开发环境配置与应用开发详细的配置指南
在macOS上进行开发环境配置与应用开发,需要遵循一系列步骤来确保你的开发环境既高效又稳定。以下是一个详细的配置指南,涵盖了从安装基本工具到创建应用的整个过程。 1. 安装和更新macOS 首先,确保你的macOS是最新版本。更新系统可以提供更…...

JavaScript 事件处理基础
在网页中添加事件监听器,可以通过JavaScript代码来实现。 要处理用户的交互事件,需要先选择要添加事件监听器的元素,可以使用document.querySelector()或document.getElementById()等方法来获取元素。 然后,使用addEventListene…...