点击sourcetree左上角的提交+号按钮总会弹出提示:

截屏2023-08-22 10.04.59.png
选择放弃变基报错,选择继续变基报错:
error: could not read '.git/rebase-merge/master': No such file or directory
也就是说 git rebase (--continue | --abort | --skip)这三种命令都不起作用,并弹出如上报错。
项目目录输入命令:git status
Last command done (1 command done):
pick 226b8bf 支付路由完善+
Next commands to do (1 remaining commands):
pick 534c24a 支付路由+完善
(use "git rebase --edit-todo" to view and edit)
You are currently editing a commit while rebasing branch 'master' on '9337780'.
(use "git commit --amend" tp amend the current commit)
(use "git rebase --continue" once you are satisfied with your changes)
疑似前同事变基过程中遇到冲突,导致变基中断报错。
运行:
git show 226b8bf
git show 534c24a
提示如下:
fatal: ambiguous argument '83516cb': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
查看不到任何提交记录,怀疑已被撤销或删除。
运行提示的
git rebase --edit-todo
git commit --amend
git rebase --continue
仍然不起作用。
多方查找资料,花了整整半天时间,最后使用
rm -fr ".git/rebase-merge"
将git rebase产生的中间文件删除,解决了问题。