git記一次前同事變基中斷導(dǎo)致的sourcetree不停彈框

點(diǎn)擊sourcetree左上角的提交+號(hào)按鈕總會(huì)彈出提示:


截屏2023-08-22 10.04.59.png

選擇放棄變基報(bào)錯(cuò),選擇繼續(xù)變基報(bào)錯(cuò):

error: could not read '.git/rebase-merge/master': No such file or directory

也就是說(shuō) git rebase (--continue | --abort | --skip)這三種命令都不起作用,并彈出如上報(bào)錯(cuò)。
項(xiàng)目目錄輸入命令: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)

疑似前同事變基過(guò)程中遇到?jīng)_突,導(dǎo)致變基中斷報(bào)錯(cuò)。

運(yùn)行:

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  [...] -- [...]'

查看不到任何提交記錄,懷疑已被撤銷(xiāo)或刪除。

運(yùn)行提示的

git rebase --edit-todo
git commit --amend
git rebase --continue

仍然不起作用。

多方查找資料,花了整整半天時(shí)間,最后使用

rm -fr ".git/rebase-merge"

將git rebase產(chǎn)生的中間文件刪除,解決了問(wèn)題。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容