Git Pre-commit Hooks
The guidance on this page is no longer valid, and is due to be updated.
Git hooks are scripts that Git executes before or after events such as commit, push, and receive. Pre-commit hooks are useful in detecting secrets automatically before developers commit work locally on their machines.
The Cabinet Office Digital Cyber Security team has recommended a pre-commit git hook called Detect Secrets for preventing secrets being commited to git. This is no longer centrally managed but something that teams should customise for their local usage.