fatal: Could not open file .git/rebase-merge/done for reading: No such file or directory

后端 未结 4 757
走了就别回头了
走了就别回头了 2021-02-03 17:21

I was going to do a rebase to delete my last commit but I didn\'t want to finish so I exited. (I realize this probably was not the best way to go about it, but it\'s done) I gue

4条回答
  •  [愿得一人]
    2021-02-03 17:51

    DavidN's solution to abort the rebase is great as long as you don't have any unstaged changes since the last rebase going south!

    If you wrote code after the rebase attempt, ignoring the could not open file .git/rebase-merge/done message,

    then your best bet is to do

    git stash
    

    to save your local changes and only then abort the rebase.

    I am sure this is one of those stackoverflow questions, where people who are eager to solve their problem without considering the implications, will just run the abort command and regret it soon after.

提交回复
热议问题