git错误--error: Merging is not possible because you have unmerged files. hint: Fix them up in the work

当遇到'error: Merging is not possible because you have unmerged files.'的Git错误时,需要先通过'git status'查看差异文件,然后使用'git add'将这些文件加入暂存区,接着'git commit'提交。如果仍存在问题,可以尝试使用'git push -f origin master'强制推送,并确保在master分支上操作。建议在独立的分支进行开发。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这样的错误是本地的文件和未提交(commit)的文件有差异。所以,在这里先使用git status

然后 git add 差异文件。然后在git commit。但是,这里又会出现一个问题。

这个时候使用 git push -f origin master

然后切换分支到master。

建议在分支开发。

这是操作记录,按说明没有成功 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
发出的红包

打赏作者

韩淼燃

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值