Commit-editmsg
The screen flickered, and suddenly, he wasn't in his IDE anymore. He was looking at a file named .
The COMMIT-EDITMSG file is a transient, temporary file created by Git in the .git/ directory (specifically, .git/COMMIT_EDITMSG ) whenever you initiate a commit that requires an editor. Its sole purpose is to hold the for the commit currently in progress. COMMIT-EDITMSG
Because COMMIT_EDITMSG is just a text file, you can technically edit it directly without using git commit . For example: The screen flickered, and suddenly, he wasn't in
Instead of constructing a massive string for git commit -m , you can write your message into .git/COMMIT_EDITMSG (or a temporary file) and run git commit -F <filename> . Its sole purpose is to hold the for
Now Git will ignore lines starting with ; and leave your # lines alone in the final commit.