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
- Git hook — A script Git runs automatically at a point in its workflow, such as pre-commit, which can stop the commit by exiting non-zero.
- commit message — The text a person writes into a commit to say what it does and why: a one-line subject, a blank line, then an optional body.
Taught in
- Conventional Commits — Advanced Git Internals & Distributed Workflows