Sometimes, you might manually edit this file or a hook leaves it in a bad state. If you ever open it and see old garbage text interfering with a new commit, you can simply delete the file. Git will recreate it on the next commit.
: Git reads the content of COMMIT-EDITMSG , applies it to the commit, and then completes the process. COMMIT-EDITMSG
If you use the -m flag (e.g., git commit -m "Initial commit" ), Git bypasses this file and writes the message directly to the commit object. 📍 Where is it located? Sometimes, you might manually edit this file or
: Keep the first line under 50 characters . It should be a concise summary of the change. applies it to the commit