Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for pre-push hooks #1558

Open
ruslanpashkov opened this issue Feb 11, 2025 · 0 comments
Open

Add documentation for pre-push hooks #1558

ruslanpashkov opened this issue Feb 11, 2025 · 0 comments

Comments

@ruslanpashkov
Copy link

The current Husky documentation mentions that hooks can run on push, but there is no explicit mention of pre-push hooks or how to implement them. This makes it unintuitive for new users who are only introduced to pre-commit in the documentation.

Steps to Reproduce

  1. Check the Husky documentation
  2. Search for pre-push
  3. Notice that there is no clear example of how to set up pre-push hooks

Expected Behavior

The documentation should provide an example of how to set up a pre-push hook, similar to how pre-commit is documented.

Context

While it's possible to set up pre-push hooks using native Git hooks, one of Husky's main benefits is making Git hooks easier to manage and share across teams. Having clear documentation about pre-push hooks would help users understand how to leverage Husky's advantages over manual Git hook setup.

Suggested Fix

Add a section for pre-push hooks with a basic example, like:

echo "npm test" > .husky/pre-push

This will help new users understand how to use Husky beyond pre-commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant