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

相关推荐
Python私教7 小时前
Codex 自动写 Commit 够安全吗?一套证据化 Git 提交流程
人工智能·git·后端
果果燕7 小时前
实习笔记(一):NFS、Samba、VNC、Git、CMake、systemd、内核、交叉编译
linux·arm开发·c++·笔记·git
美味蛋炒饭.8 小时前
Git 版本控制(下)
开发语言·git·学习·总结·后端开发
互联网中的一颗神经元8 小时前
09 — .git 地图:打开那个隐藏文件夹
大数据·git·elasticsearch
Patrick_Wilson10 小时前
你知道 git check 的故事吗
git·程序员·命令行
互联网中的一颗神经元12 小时前
10 — 对象模型:.git/objects 里到底装了什么
git
沫璃染墨14 小时前
《从零入门Linux系统篇(十四):系统工具篇·五——Git版本控制:从版本管理到协同开发》
linux·运维·服务器·git·gitee·github
Slow菜鸟14 小时前
第5篇:进阶规范篇 · 团队协作最佳实践
git
qingyulee15 小时前
git常用指令
大数据·git·elasticsearch
雨声不在15 小时前
Git fetch 失败: gnutls_handshake() failed 的排查与修复
git