pre-commit hook

A Git hook that runs before a commit is created and can refuse the commit, for example when it contains something shaped like a secret.

In more detail

It is the earliest and cheapest gate, catching a likely secret before it becomes history. A developer can skip it, so the same check must also run in the central pipeline and over the full history.

Example

It is the earliest and cheapest gate, but a developer can skip it, so the course repeats the check in the central pipeline and over history.

Related terms

Taught in

References

Certification courses