It's important to establish a default editor with Git, as it's the program that will be used to open up all of your files.
Using Atom as your editor
You can set your default editor in Git to use Atom if you have installed the editor.
- Install Atom.
 - Type the following command in the terminal:
git config --global core.editor "atom --wait" 
Using Sublime Text as your editor
You can set your default editor in Git to use Sublime Text 2 if you have installed the subl command.
- Install 
subl - Set this as your editor for Git by typing the following command in the terminal:
git config --global core.editor "subl -n -w" 
Using TextMate as your editor
You can set your default editor in Git to use Textmate if you have installed the mate command.
- Install 
mate - Set this as your editor for Git by typing the following command in the terminal:
git config --global core.editor "mate -w"