Occasionally I will drop into troubleshooting mode and commit/push a number of small but separate commits with a comment like, \"Troubleshooting the during
.git/COMMIT_EDITMSG contains the last commit message. https://git-scm.com/docs/git-commit#_files
git commit --file .git/COMMIT_EDITMSG
will use that file as the commit message.