Hacker News new | past | comments | ask | show | jobs | submit login

How do you enforce such commits messages? People makes mistakes, or forget stuff. But when you have a pull request, all intermediate commits are already pushed to central repository. They already are public. You can't change them anymore. Pre-commit hook?



The commit-msg hook. You can use it to validate your project state or commit message before allowing a commit to go through. The git docs demonstrate using this hook to check that your commit message is conformant to a required pattern.


It's not easy to enforce local hooks. And maintaining it becomes difficult if you have a lot of small repos.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: