当前位置: 首页 > 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…...

Chapter03-Authentication vulnerabilities

文章目录 1. 身份验证简介1.1 What is authentication1.2 difference between authentication and authorization1.3 身份验证机制失效的原因1.4 身份验证机制失效的影响 2. 基于登录功能的漏洞2.1 密码爆破2.2 用户名枚举2.3 有缺陷的暴力破解防护2.3.1 如果用户登录尝试失败次…...

可靠性+灵活性:电力载波技术在楼宇自控中的核心价值

可靠性灵活性&#xff1a;电力载波技术在楼宇自控中的核心价值 在智能楼宇的自动化控制中&#xff0c;电力载波技术&#xff08;PLC&#xff09;凭借其独特的优势&#xff0c;正成为构建高效、稳定、灵活系统的核心解决方案。它利用现有电力线路传输数据&#xff0c;无需额外布…...

【论文笔记】若干矿井粉尘检测算法概述

总的来说&#xff0c;传统机器学习、传统机器学习与深度学习的结合、LSTM等算法所需要的数据集来源于矿井传感器测量的粉尘浓度&#xff0c;通过建立回归模型来预测未来矿井的粉尘浓度。传统机器学习算法性能易受数据中极端值的影响。YOLO等计算机视觉算法所需要的数据集来源于…...

鸿蒙中用HarmonyOS SDK应用服务 HarmonyOS5开发一个生活电费的缴纳和查询小程序

一、项目初始化与配置 1. 创建项目 ohpm init harmony/utility-payment-app 2. 配置权限 // module.json5 {"requestPermissions": [{"name": "ohos.permission.INTERNET"},{"name": "ohos.permission.GET_NETWORK_INFO"…...

QT: `long long` 类型转换为 `QString` 2025.6.5

在 Qt 中&#xff0c;将 long long 类型转换为 QString 可以通过以下两种常用方法实现&#xff1a; 方法 1&#xff1a;使用 QString::number() 直接调用 QString 的静态方法 number()&#xff0c;将数值转换为字符串&#xff1a; long long value 1234567890123456789LL; …...

#Uniapp篇:chrome调试unapp适配

chrome调试设备----使用Android模拟机开发调试移动端页面 Chrome://inspect/#devices MuMu模拟器Edge浏览器&#xff1a;Android原生APP嵌入的H5页面元素定位 chrome://inspect/#devices uniapp单位适配 根路径下 postcss.config.js 需要装这些插件 “postcss”: “^8.5.…...

安宝特案例丨Vuzix AR智能眼镜集成专业软件,助力卢森堡医院药房转型,赢得辉瑞创新奖

在Vuzix M400 AR智能眼镜的助力下&#xff0c;卢森堡罗伯特舒曼医院&#xff08;the Robert Schuman Hospitals, HRS&#xff09;凭借在无菌制剂生产流程中引入增强现实技术&#xff08;AR&#xff09;创新项目&#xff0c;荣获了2024年6月7日由卢森堡医院药剂师协会&#xff0…...

算法:模拟

1.替换所有的问号 1576. 替换所有的问号 - 力扣&#xff08;LeetCode&#xff09; ​遍历字符串​&#xff1a;通过外层循环逐一检查每个字符。​遇到 ? 时处理​&#xff1a; 内层循环遍历小写字母&#xff08;a 到 z&#xff09;。对每个字母检查是否满足&#xff1a; ​与…...

C#中的CLR属性、依赖属性与附加属性

CLR属性的主要特征 封装性&#xff1a; 隐藏字段的实现细节 提供对字段的受控访问 访问控制&#xff1a; 可单独设置get/set访问器的可见性 可创建只读或只写属性 计算属性&#xff1a; 可以在getter中执行计算逻辑 不需要直接对应一个字段 验证逻辑&#xff1a; 可以…...

4. TypeScript 类型推断与类型组合

一、类型推断 (一) 什么是类型推断 TypeScript 的类型推断会根据变量、函数返回值、对象和数组的赋值和使用方式&#xff0c;自动确定它们的类型。 这一特性减少了显式类型注解的需要&#xff0c;在保持类型安全的同时简化了代码。通过分析上下文和初始值&#xff0c;TypeSc…...