How to husky prepare-commit-msg on windows?
See original GitHub issueUsing husky it is very useful but script which is there is designed only for bash purpose.
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && git cz --hook",
}
}
What could be solution for Windows?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:45
- Comments:25 (5 by maintainers)
Top Results From Across the Web
Husky - Git hooks
Husky improves your commits and more woof! You can use it to lint your commit messages, run tests, lint code, etc... when you...
Read more >How to Add Commit Hooks to Git with Husky to Automate ...
How to Add Commit Hooks to Git with Husky to Automate Code Tasks · Step 0: How to set up a new project...
Read more >Getting Started with Git Hooks and Husky | Tower Blog
Run a linter to check commit messages. Run a linter to style/format committed code. Compress any images added to the project. Run Jest...
Read more >Git pre-commit hook is not running on Windows - Stack Overflow
Name your hook pre-commit (without any file extension). And add #!/bin/sh on the first line or #!/bin/bash .
Read more >Making yarn and husky hooks work with windows - Jesse Baird
ZB17-JMYrepos3.0node_modules.binhusky-run: command not found Can't find Husky, skipping prepare-commit-msg hook You can reinstall it using ...
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
@neilime, Although your trick works, I seem to be running into the following issue where the up and down arrow keys causes this very annoying duplication effect. I’m on Windows 7 Enterprise, Git version 2.24.0.windows.2
Hi,
I’ve found something that works on my windows 10, with pure batch (bat) scripts (so it does not require bash or git bash)
In my package.json:
I have created two bat files at the root of my repo: