Why You Need a Git Pre-Commit Hook and Why Most Are Wrong - Yipit Django Blog
A pre-commit hook is a piece of code that runs before every commit and determines whether or not the commit should be accepted. Think of it as the gatekeeper to your codebase.
Want to ensure you didn't accidentally leave any PDBs in your code? Pre-commit hook. Want to make sure your javascript is JSHint approved? Pre-commit hook. Want to guarantee clean, readable PEP8-compliant code? Pre-commit hook. Want to pipe all of the comments in your codebase through Strunk & White? Please don't.
Read full article from Why You Need a Git Pre-Commit Hook and Why Most Are Wrong - Yipit Django Blog
No comments:
Post a Comment