VSCode种git rebase分支冲突解决无法继续rebase

情景:

常规来说我们git开分支开发完新功能之后,提交之前rebase dev分支,然后合并到dev上算是开发完成。

问题还原:

在开发完之后执行如下指令:

1.执行变基操作:git rebase dev。

//这一步出现冲突vscode上处理冲突,点击添加(相当于add,下图1 "+");vscode上点击"继续(下图1 Continue)"直接弹框报错(下图2)
图1

图2

//按照理想步骤 处理完冲突执行git rebase --continue就完事的,实际上执行会报错如下,无法进行下一步:

javascript 复制代码
PS D:\game\client_new_skin> git rebase --continue
Applying: 处理马甲包交互函数
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

处理方法

在合并分支的时候使用指令:

git rebase dev --rebase-merges

处理完冲突并add之后,执行操作:

git commit --allow-empty

然后就是vim操作了,写提交日志如下图:

保存之后就可以执行

git rebase --continue

OK了。

最后感谢问题分享:

git rebase --continue不起作用 _大数据知识库

相关推荐
技术卷3 小时前
在公司网络 + VSCode Remote SSH 环境下使用 Codex 经验总结
vscode·网络配置·codex认证·remote ssh
C++ 老炮儿的技术栈5 小时前
分享一个安全的CString
c语言·c++·windows·git·安全·visual studio
F1FJJ7 小时前
Shield CLI Postgres v0.3.10:当 142 张表挤在一张 ER 图里,我们做了什么
网络·vscode·网络协议·postgresql·开源软件
努力干饭中7 小时前
Git Rebase 最佳实践
前端·git
ノBye~8 小时前
Docker Compose+Jenkins自动化部署全流程
git·docker·jenkins
小Tomkk10 小时前
怎么配置 Visual Studio Code 配置 C/C++
c语言·c++·vscode
社恐的下水道蟑螂10 小时前
前端面试必问 Git 通关指南:常用命令速查 + merge/rebase 深度辨析,看完再也不慌
前端·git·面试
DanCheOo10 小时前
我写了一个 AI Commit Message 生成器,再也不用想怎么写 git commit 了
git·全栈
. . . . .10 小时前
git-ai 项目详解
人工智能·git
golang学习记11 小时前
VSCode 官宣:全新默认主题!
ide·vscode·编辑器