Use Git Commit Hooks to Run Composer Install
I know a lot of us have problems remembering to run composer install whenever we checkout a new branch in Vanilla. If this annoys you then you can add a couple of simple scripts to your .git/hooks directory to automatically run commands so you never have to worry about forgetting again. Read on:
Create a file named
post-checkoutwith the following contents:#!/bin/sh composer install
Make this file executable (chmod a+x).
You will also want this to run when you merge so copy the file above to
.git/hooks/post-merge.
1