Introduction
Sometimes when you write commit messages or edit files in Git, you want to use your favorite text editor. Git lets you set which editor to use so you can work comfortably and efficiently.
When you want to write commit messages in an editor you know well instead of the default one.
When you need to edit Git configuration files or rebase instructions and want a familiar editor.
When you work on different machines and want to keep the same editor experience everywhere.
When you want to avoid confusion by setting a clear editor for all Git commands that open an editor.
When you want to use a graphical editor instead of a command-line one for easier editing.