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

前端 未结 2 539
攒了一身酷
攒了一身酷 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:31

    Try adding the GIT_EDITOR environment variable before your command, like so:

    GIT_EDITOR= git rebase <...>
    

    For example, to use nano I would type:

    GIT_EDITOR=nano git rebase -i abcdef1234
    

提交回复
热议问题