Purpose of gitignore and interplay with git clean #59
-
Hi! Thanks you for creating this tool. We use it to keep our commits straight and catch build-breaking mistakes locally, before they even hit CI. We're having a small issue regarding the $ git commit -am "test"
.husky/prepare-commit-msg: line 2: .husky/_/husky.sh: No such file or directory Would you happen to have a solution for this? Can we perhaps safely un-ignore Husky.Net/src/Husky/Cli/InstallCommand.cs Lines 109 to 116 in ca3543d |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @tiplu-alexpovel, These files are ignored by default because usually, people don't want to push the husky internal files to their repository. However, you have raised an interesting issue! Removing the .gitignore file might solve the problem, but it will probably be regenerated each time you use the husky install command (I haven't tested it yet). This isn't the best solution if it gets regenerated. However, I can add an option to the install command to prevent generating the .gitignore file if you think it could solve the problem. Please let me know if you think this option could work, and if you have any other ideas or suggestions for resolving the issue. I will do my best to implement it as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for your super swift reply. Please enjoy your vacation, we're between years after all and this issue is not urgent! You're right, a A flag to skip generating a For us, it's enough to know committing |
Beta Was this translation helpful? Give feedback.
Hi @tiplu-alexpovel,
These files are ignored by default because usually, people don't want to push the husky internal files to their repository. However, you have raised an interesting issue! Removing the .gitignore file might solve the problem, but it will probably be regenerated each time you use the husky install command (I haven't tested it yet). This isn't the best solution if it gets regenerated.
However, I can add an option to the install command to prevent generating the .gitignore file if you think it could solve the problem. Please let me know if you think this option could work, and if you have any other ideas or suggestions for resolving the issue. I will do my best to impleme…