VSCODE解决git合并过程中的冲突问题;error: failed to push some refs to

1:异常现象

推送有冲突的git修改到远端的时候,会有如下提示

git.exe push --progress "origin" master:master

To http://gitlab.xxx.com/dujunqiu/test.git

! rejected master -> master (fetch first)

error: failed to push some refs to 'http://gitlab.xxx.com/dujunqiu/test.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 did not exit cleanly (exit code 1) (1172 ms @ 2024/3/9 15:59:25)

2:修改方式

注意这里需要将VSCODE版本更新为1.8x;1.7x的版本可能不支持 GitLens;

安装如下两个插件
直接把 远端合并有冲突的分支拉取一下
本地就会显示有冲突提示了
选择 "在合并编辑器中解析";根据界面提示,选择左侧或者右侧的内容之后,点击 "完成合并"
此时再push到git就不会有合并冲突了

相关推荐
梅塔文·欧帕西安卡琼3 小时前
git的底层原理详解
git
待什么青丝4 小时前
【git的摸鱼技巧】之工欲善其事
git·elasticsearch·搜索引擎
2601_961194025 小时前
高中英语教资资料推荐|科三大题背诵和教学设计模板
git·开源·github·开源软件·开源协议·ossinsight
ting94520005 小时前
InsForge Backend Branching 后端全链路 Git 式分支技术原理、架构实现与底层源码剖析
人工智能·git·elasticsearch·架构
程序猿阿伟5 小时前
《扣子如何让OpenClaw技能开发提速》
人工智能·git·github
摇滚侠7 小时前
IDEA 创建 Java 项目 推送到远程 Git 仓库
java·git·intellij-idea
稷下元歌7 小时前
7天学会plc加机器视觉关于运动控制部份,配套视频在bib
开发语言·c++·git·vscode·python·docker·pip
tealcwu8 小时前
【Git 实战】三类方案实现一键推送多端仓库(Gitee & GitHub)
git·gitee·github
摇滚侠8 小时前
git ignore 忽略 .idea 目录 全新项目(尚未提交过 .idea).idea 已经被 Git 跟踪(已提交过)
java·git·intellij-idea
之歆12 小时前
Day05_Git 版本控制完全指南:从入门到精通的专业实践
git