Introduction
Git tops the list of version control software, allowing developers to collaborate and keep track of changes to source code....
For further actions, you may consider blocking this person and/or reporting abuse
Nice article chi, but how can you initialize this git/hook on your project? do I just create a directory for it or what? or is there a command to scafold git hook?
Thank you Emeka. Git hooks are built into every project that has git initialized. So you already have git hooks available in your project. It is inside the .git/hooks folder in the .git directory. Since it hidden, you'll have to set your vscode to unhide hidden folders. You'll see the git hooks then. You can then overwrite the default code in any of the hooks to suit your needs.
Try out husky. It gives you hooks, with less hassle.
Using the VS Code toolbar go to ‘Code’ > ‘Preferences’ > ‘Settings’ and search for ‘exclude’ and you will find the default exclude list. Notice how this can be configured for the current user or the current workspace.
Thank you for reading and sharing that tip.
Nice One Thanks
Thank you Seun.
Great write up sis. But I guess going the git route complicates things too much. I'll rather recommend using Husky hooks. I've been using Husky for some good time now, and it integrates very easily with git.
Husky Is perfect I guess.
Thank you for reading, Andrew. Yes, husky simplifies using git hooks in Nodejs projects. I use it at work too. However, I wanted to delve into the bare bones of git hooks. Thanks for commenting.
Really insightful article
Thank you very much.