Adding execute permissions using git

It may be necessary to add execute permissions to custom build and hook scripts included in a project repo. This most frequently presents with the error Error: spawn EACCES during Deploy or Package builds.

Adding execute permissions is possible on any OS with git installed using the following command.

git update-index --chmod=+x <file>

This command modifies the repo directly. Be sure to run this after running git add and before git commit.