Skip to main content Skip to footer

Commit-editmsg |top| Jun 2026

Keep it under 50 characters and in the imperative mood (e.g., "Fix bug" instead of "Fixed bug").

By default, Git ignores lines starting with # . If your commit message needs to contain a hashtag (e.g., #coding ), this causes issues. You can change the comment character in your global config: COMMIT-EDITMSG

flag is a "best practice" for professional development for several reasons: Encourages Detail Keep it under 50 characters and in the imperative mood (e

# List any issues closed by this change (e.g., Closes #123) # -------------------- # Do not modify the lines above. COMMIT-EDITMSG

COMMIT_MSG_FILE=$1

flag often leads to shallow, one-line messages like "fixed bug." Opening the full COMMIT_EDITMSG file encourages you to follow the 50/72 rule