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

前端 未结 4 1751
孤独总比滥情好
孤独总比滥情好 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:37

    Just delete all the lines that are not comments from the file. Then save it to the default supplied path and exit the editor.

    As a result git will just do nothing in this rebase.

    To delete all lines in vim you can use

    :%d|x
    

    Then save and quit.

    delete all lines of file in Vim

    How to exit the Vim editor?

    VIM - multiple commands on same line

提交回复
热议问题