git rebase --editor=/something/other/than/vim? (for easier squashing)

前端 未结 2 540
攒了一身酷
攒了一身酷 2021-02-01 13:21

I happily use vim as my default editor for commits, and do not wish to change it. However, when it comes to rebasing, I find myself squashing dozens and dozens of commits which

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-01 13:33

    There is an even better option for all your interactive rebase.

    https://github.com/sjurba/rebase-editor

    It is a custom CLI app written in node specifically for interactive rebase.

    To install:

    npm install -g rebase-editor
    git config --global sequence.editor rebase-editor 
    

    Or with yarn:

    yarn global add rebase-editor
    git config --global sequence.editor rebase-editor 
    

提交回复
热议问题