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

相关推荐
2401_8260976218 小时前
同步&异步日志系统-日志落地模块的实现
c++·git·vim
半旧夜夏19 小时前
阿里云IOT消息处理
java·ide·git·物联网·spring·阿里云
我们的五年20 小时前
【Git版本控制器】第三弹——版本回退,撤销修改,删除文件
大数据·linux·git
一名嵌入式糕手20 小时前
Git从基础到进阶
git
不cong明的亚子21 小时前
github用户名密码登陆失效了
git·github
QC七哥21 小时前
git开发流程以及github社区企业版
git·github
邂逅you1 天前
GitHub基本操作及Git简单命令
git·github
EngZegNgi1 天前
git 提示 fatal: The remote end hung up unexpectedly
git
ricky_fan1 天前
本地部署MindSearch(开源 AI 搜索引擎框架),然后上传到 hugging face的Spaces——L2G6
人工智能·git·python
misty youth1 天前
github与git bash绑定问题
git·github·bash