Git异常 #Git提交代码时提示:Committing is not possible because you have unmerged files.

1. 异常现象

IDEA 上进行 Git 代码提交时提示:Committing is not possible because you have unmerged files.
意思是:由于您没有合并的文件,因此无法提交。
1
 

2. 排查分析

找到她。
 

3. 解决方案

1)使用 Git 命令查看哪些文件冲突:

git status

2)如果是已经解决了冲突,则只需要将文件添加到 git 然后按照正常的方式提交:

git add [filename]

3)如果没有解决冲突,或者忘记了,或者不知道有哪些文件没有解决冲突:
全局搜索(Ctrl+Shift+F)++<<<<<<< HEAD,或者++<<<<<<<,找出还没有完成合并的冲突文件,并进行手动合并解决

4)如果是需要删除的文件,则需要手动进行删除:

git rm [filename]

2
最后再次进行 Git 提交~

这是操作记录,按说明没有成功 JiuJue@DESKTOP-5ER8D0A MINGW64 /d/wwwRoot/SHARE/D-JingWaiDianShang/uni-app (master) $ git revert --no-commit b12ce7b 143c352 8eaea60 Auto-merging config/app.js CONFLICT (content): Merge conflict in config/app.js Auto-merging pages/users/login/index.vue CONFLICT (content): Merge conflict in pages/users/login/index.vue CONFLICT (modify/delete): pages/users/order_confirm/index.vue deleted in parent of b12ce7b (代码提交) and modified in HEAD. Version HEAD of pages/users/order_confirm/index.vue left in tree. CONFLICT (modify/delete): static/html/pc.html deleted in parent of b12ce7b (代码提交) and modified in HEAD. Version HEAD of static/html/pc.html left in tree. error: could not revert b12ce7b... 代码提交 hint: after resolving the conflicts, mark the corrected paths hint: with 'git add <paths>' or 'git rm <paths>' hint: Disable this message with "git config advice.mergeConflict false" JiuJue@DESKTOP-5ER8D0A MINGW64 /d/wwwRoot/SHARE/D-JingWaiDianShang/uni-app (master|REVERTING) $ git commit -m "撤销 08acc0c 之后的所有提交" error: Committing is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict. U config/app.js U pages/users/login/index.vue U pages/users/order_confirm/index.vue U static/html/pc.html JiuJue@DESKTOP-5ER8D0A MINGW64 /d/wwwRoot/SHARE/D-JingWaiDianShang/uni-app (master|REVERTING) $ git push origin master Everything up-to-date JiuJue@DESKTOP-5ER8D0A MINGW64 /d/wwwRoot/SHARE/D-JingWaiDianShang/uni-app (master|REVERTING) $ JiuJue@DESKTOP-5ER8D0A MINGW64 /d/wwwRoot/SHARE/D-JingWaiDianShang/uni-app (master|REVERTING) $ JiuJue@DESKTOP-5ER8D0A MINGW64 /d/wwwRoot/SHARE/D-JingWaiDianShang/uni-app (master|REVERTING) $ git log --oneline 8eaea60 (HEAD -> master, origin/master) 修改googel登录 143c352 代码修改提交 b12ce7b 代码提交 08acc0c fix: 佣金界面 07d2c67 fix: 佣金界面 bdf7b8e fix: 佣金界面 0987ad2 fix: 积分商品兑换取消注释 f69164e fix: 全局修改货币标识 f2d4406 fix: 接入paypal a4e1679 fix: 商品跳转链接 90ccade fix: 商品详情页布局 0528b9d fix: 商品详情页布局 507c453 fix: 页面调整 5ecc127 fix: 页面语言调整 a601cf8 fix: 首页商品 42be322 fix: 移除 30a509a fix: 分类页面 617dd9d fix: 分类页面 813aba6 fix: 添加uviewui fbcb681 fix: first commit
最新发布
03-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值