Skip to content

Instantly share code, notes, and snippets.

@girol
Created April 20, 2018 22:13
Show Gist options
  • Save girol/2c3ea51ae3f5f0f2c533a893b4bda429 to your computer and use it in GitHub Desktop.
Save girol/2c3ea51ae3f5f0f2c533a893b4bda429 to your computer and use it in GitHub Desktop.
Git Hook Composer Autoloader
#/bin/bash
export GIT_WORK_TREE=/folder/to/my/app # like /var/www
#export GIT_DIR=/my/repo.git
git checkout -f master
cd $GIT_WORK_TREE
composer dump-autoload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment