Git · Middle · Question 15 of 75

What is a pre-commit hook commonly used for?

Explanation

Combined with lint-staged it checks only the files being committed, so it stays fast. It can be skipped with --no-verify, so CI must still run the same checks.

Further reading

Problem with a question

Git · Middle · question 15

Test yourself

Take the Git · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz