#!/bin/sh # .git/hooks/commit-msg
Found at .git/COMMIT_EDITMSG within your repository.
read -r subject < "$COMMIT_MSG_FILE"
When you run git commit without the -m flag, Git opens your default text editor and creates this file in the .git/ directory. It contains any pre-filled comments (which Git strips out later) and is where you type your summary and description.