I would like to use Sublime editor for git (esp. rebase) editing operations rather than default vi editor in macOS. The following steps will help you to configure Sublime as your git editor.
Make Sublime accessible from anywhere in the terminal
subl command that can be used to invoke Sublime (version 3) from the terminal is located at
First we have to make this accessible from anywhere in the terminal. For that, create a symbolic link to any folder that is already part of
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Set Sublime as git editor
git config --global core.editor "subl -n -w"
Additional parameters do the following here:
-ntells git to open a new editor window
-wtells git to wait until the commit message is saved
This should get it working for you! Try out by running the command
git rebase -i HEAD~