Commit-editmsg

message_file=$1 # This is the path to COMMIT-EDITMSG pattern="^(feat|fix|docs|style|refactor|test|chore)((.+))?: .+"

Now Git will ignore lines starting with ; and leave your # lines alone in the final commit. COMMIT-EDITMSG

Git hooks are scripts that run at specific points. The prepare-commit-msg hook runs before the editor opens. message_file=$1 # This is the path to COMMIT-EDITMSG