Staged git files are files that have been selected and set as stagging (ready for commitint).
You move altered files to stagging whenever you run git add -A (or git add . or git add <file1> <file2>). you get the gist!
The impotance of this is that we can execute code format scripts, run tests and be sure everything works well before we write commits and later push to our code registory (eg Github)
Just as the name implies, a
pre-commit
hook is simple a function that is executed prio to agit commit
action.Husky helps us by providing ways we could execute pre-commit hooks
coupled with lint-stage which let's us run linters against
staged
git files and don't let 💩 slip into your code base!stagging
(ready for commitint).stagging
whenever you rungit add -A
(orgit add .
orgit add <file1> <file2>
). you get the gist!The impotance of this is that we can execute code
format
scripts, runtests
and be sure everything works well before we write commits and later push to ourcode registory
(eg Github)