Git · Hooks
pre-push hook
Runs before pushing. Use it for tests, not for long deployments.
Syntax
.git/hooks/pre-pushExample
Example
#!/bin/sh npm test
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.