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就不会有合并冲突了

相关推荐
6230_38 分钟前
git使用“保姆级”教程1——简介及配置项设置
前端·git·学习·html·web3·学习方法·改行学it
为祖国添砖爪哇2 小时前
【Git原理与使用】多人协作与开发模型(2)
git
memories1983 小时前
git使用方法详解(适合新手)
git
为祖国添砖爪哇3 小时前
【Git原理与使用】版本管理与分支管理(1)
git
GoppViper6 小时前
golang学习笔记29——golang 中如何将 GitHub 最新提交的版本设置为 v1.0.0
笔记·git·后端·学习·golang·github·源代码管理
m0_464832367 小时前
Linux服务器上安装git lfs命令
git
贩卖纯净水.14 小时前
白月光git
git·github
爱吃瓜的猹z18 小时前
git reset 几点疑问
git·源代码管理
悟空20161 天前
001、Git开发流程规范
git
Li小李同学Li1 天前
git学习【持续更新中。。。】
git·学习·elasticsearch