Git Hooks/Pre-push hook path

Default path for pre-push hook script.

Section: Client-Side Hooks

Pre-push hook path

sh
bash
.git/hooks/pre-push

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Client-Side Hooks
Pre-commit hook path
Default path for pre-commit hook script.
OpenIn sheetshsame section
Commit-msg hook path
Default path for commit-msg hook script.
OpenIn sheetshsame section
Make hook executable
Hooks must be executable to run.
OpenIn sheetbashsame section
Use centralized hooks path
Store hooks in a versioned directory.
OpenIn sheetbashsame section
Block direct pushes to main
Prevent accidental pushes to main.
OpenIn sheetsh2 tag match
Pre-commit lint script
Run linting before commit and fail on error.
OpenIn sheetsh1 tag match