with your specific code editor.
: When using git commit --amend , Git loads the previous commit message into COMMIT_EDITMSG so you can modify it. COMMIT-EDITMSG
For example, if you want to write a script that automatically adds a ticket number from your branch name to the commit message, your script will read .git/COMMIT_EDITMSG , modify the text, and save it before Git finalizes the commit. with your specific code editor
To write a good COMMIT_EDITMSG (the temporary file Git opens for your commit message), follow the widely accepted 50/72 rule To write a good COMMIT_EDITMSG (the temporary file
When you decide to edit a commit message, Git provides a file named COMMIT-EDITMSG for you to edit. This file contains the current commit message that you can modify. The process usually involves:
: Git creates or clears the .git/COMMIT_EDITMSG file and writes the current status into it.