Monthly Archives: April 2014

Auto Installing Git Hooks

Git hooks are fantastic! With a pre-commit git hook, you can run unit tests, check coding standard compliance, or anything else you want BEFORE the code is committed into the repository. The problem is that the hook needs to be manually installed on each user’s local machine. Fortunately for Unity projects, we have access to an event that lets us install it automatically. The code below does the trick.