[Question] run npx simple-git-hooks every time you change a command
See original GitHub issueIs this a good idea to do something like this?
"simple-git-hooks": {
"pre-commit": "npx simple-git-hooks && npx lint-staged"
}
so that people don’t need to run npx simple-git-hooks
command when the config change
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:12 (3 by maintainers)
Top Results From Across the Web
simple-git-hooks - npm
Update git hooks command. Change the configuration. Run npx simple-git-hooks from the root of your project. Note for yarn2 users: Please run ......
Read more >githooks Documentation - Git
Hooks are programs you can place in a hooks directory to trigger actions at certain points in git's execution. Hooks that don't have...
Read more >How To Use Git Hooks To Automate Development and ...
Git hooks are event-based. When you run certain git commands, the software will check the hooks directory within the git repository to see...
Read more >Skip pre-commit hook in "npm version" command
From the docs. commit-hooks ... Run git commit hooks when using the npm version command. If you simply want to allow this one...
Read more >Git Hooks | Learn how to use pre-commit hooks, post-commit ...
Every Git repository has a .git/hooks folder with a script for each hook you can bind to. You're free to change or update...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Couldn’t this be done internally, before each command is run?
Check the hash and/or file modification time of the package.json or configuration file, and if it has changed, re-run setup?
Another idea: Install a
post-merge
hook that checks for updates to configuration, and if necessary, re-runs setup.Also, what about initial hooks install? For example, if I’ll replace husky with simple-git-hooks in my project, I need to say all project members to run
npx simple-git-hooks
. Doesn’t seem nice to me.