The official Git documentation defines it precisely: $GIT_DIR/COMMIT_EDITMSG — "This file contains the commit message of a commit in progress." In simpler terms, this is the file your text editor opens when it's time to write your commit message. The text you save is what goes into that file, and once you close the editor, Git reads it to finalize the commit.
Fix login timeout on slow networks
If you dislike the default terminal editor (which is usually Vim), you can instruct Git to open your favorite editor instead. This changes what program interacts with COMMIT_EDITMSG . git config --global core.editor "code --wait" Use code with caution. For Sublime Text: git config --global core.editor "subl -n -w" Use code with caution. For Nano: git config --global core.editor "nano" Use code with caution. 2. Using Commit Templates COMMIT-EDITMSG
