COMMIT_EDITMSG

The temporary file inside .git where Git puts the commit message you are editing, and which it passes to the commit-msg hook.

In more detail

When Git opens your editor for a message, the file you are editing is .git/COMMIT_EDITMSG. A commit-msg hook receives its path as the first argument and can read or reject it.

Related terms

Taught in

References