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

相关推荐
咕咕嘎嘎10246 分钟前
问卷系统测试报告
git
水无痕simon1 小时前
04 Git基础-记录每次更新到仓
git
无限进步_1 小时前
【C++】寻找数组中出现次数超过一半的数字:三种解法深度剖析
开发语言·c++·git·算法·leetcode·github·visual studio
一个程序猿老马13 小时前
012、远程协作:连接GitHub/Gitee与git remote
git·gitee·github
Lisonseekpan16 小时前
Git:如何将一个分支的特定提交合并到另一个分支?
java·大数据·git·后端·elasticsearch
pas13618 小时前
git 配置
git
独隅21 小时前
Git误操作急救手册
大数据·git·elasticsearch
水无痕simon1 天前
03 Git 工作流程
git
一个程序猿老马1 天前
013、推送与拉取:git push与git pull的协作流程
大数据·git·elasticsearch
每天进步一点点️1 天前
GIT - 常用命令合辑
git