Thoughtworks Insights

Pre-commit: Don’t git hooked!

Git hooks are a feature of git that enable custom scripts to be triggered on certain events during the execution of a git command, such as pre-commit and pre-push. It’s common practice for teams to use git hooks to run quality checks to ensure they are run by all developers every time. While this is a good sign that a team cares about quality and repeatability, I observe that this practice has some major downsides. In this article, I’ll explore why, and what you might do instead.
favicon
thoughtworks.com
thoughtworks.com