When you configure Git for the first time, you can also use your favorite text editor along with it. What you need to do is set the value of core.editor to the program file of your editor and add a flag -w at the end. The -w basically is to tell Git to wait until all operations within the text editor is done before Git can continue to do its thing afterwards.
git config --global core.editor '"C:\Program Files\Sublime Text 3\sublime_text.exe" -w'
Pay attention to the placement of single quote (‘) and double quotes (“). You want to enclose the whole path of your editor within the quotes, then wrap the whole argument with the flag with the other.
You can use single quote or double quotes interchangeably as long as they’re consistent
"'C:\Program Files\Sublime Text 3\sublime_text.exe' -w" works the same way as in the example above).
Mac OSX / Linux
git config --global core.editor "subl -n -w"
Now, if you want to see if the text editor is set correctly, just type in this command:
git config --global --list
And you should see the core.editor value listed to look like this:
Sublime Text is used as an example just because it’s available on Windows, OSX, and Linux. You can certainly substitute the path or program name with whatever text editor you have.