Writing a proper git message is a good coding practice. A good commit message should clearly convey what has been changed and why it has been changed. Sometimes developers use an improper message in a hurry to commit and push the changes. Here is a working hook that enforces the developer to use a commit message of 30 characters. you may start including the branch name in the commit message using git hook.