Script used to install pre-commit on all local pay-* Git repos. E.g. pay-frontend, pay-selfservice.
This will make sure that the pre-commit Git hooks run whenever you try to commit a file.
- Change directory into the top level directory containing all your
payGit repositories. - Run the following script from here:
<location-of-script>/install-pre-commit-on-all-pay-repos.sh- Loop through all directories beginning with
pay-- Will change directory into each
pay-Git repository.e.g. cd pay-frontend
- Will switch to the
masterormainbranch. - Will pull the latest changes
- Will delete any existing
pre-commithooks.rm ./git/hooks/pre-commit*
- Will run
pre-commit install.- This will install the latest Git
pre-commithooks using the.pre-commit.yamlconfig file
- This will install the latest Git
- Will change directory into each
The script tries to provide a useful error message. Fix the error and run the script again.
GOV.UK Pay aims to stay secure for everyone. If you are a security researcher and have discovered a security vulnerability in this code, we appreciate your help in disclosing it to us in a responsible manner. Please refer to our vulnerability disclosure policy and our security.txt file for details.