Skip to content

how do i read the commit message in pre-commit hook #1171

Answered by dbowling
pawandeore asked this question in Q&A
Discussion options

You must be logged in to vote

The pre-commit hook doesn't have access to the commit message. You'll need to use the commit-msg hook to have access to the path that the temp file is saved in with the message, then you can read it.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by pawandeore
Comment options

You must be logged in to vote
2 replies
@dbowling
Comment options

@NielsCodes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants