How to abort a git rebase from inside vim during interactive editing

前端 未结 4 1747
孤独总比滥情好
孤独总比滥情好 2020-12-22 17:14

When I do an interactive rebase, e.g.

git rebase -i HEAD~3

the rebase interactive editor (vim in my case) opens to let me edit the commits

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-22 17:42

    If you're using Notepad++ on Windows for instance:

    CtrlA to select everything, then Del or Backspace to delete and CtrlS save. Git will abort the rebase if the file is empty.

    You may also hit CtrlC in the command prompt where git is running to stop the current rebase command. Then run git rebase --abort to revert it.

提交回复
热议问题