Git Hooks/Post-checkout regenerate assets

Run setup after checkout when needed.

Section: Hook Snippets

Post-checkout regenerate assets

sh
bash
#!/usr/bin/env sh
npm install

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 Hook Snippets
Pre-commit lint script
Run linting before commit and fail on error.
OpenIn sheetshsame section
Pre-commit test script
Run tests before commit.
OpenIn sheetshsame section
Commit-msg conventional commits validator
Reject non-conforming commit messages.
OpenIn sheetshsame section
Block direct pushes to main
Prevent accidental pushes to main.
OpenIn sheetshsame section
Pre-commit hook path
Default path for pre-commit hook script.
OpenIn sheetsh1 tag match
Show hooksPath
See whether Git uses a non-default hook directory.
OpenIn sheetbash1 tag match