When I "git pull" the project that I'm working on a ton of files sometimes come down from other developers' changes. I would like to be able to mark certain files that I want to be warned about that I might miss in the pages of text during the pull.
For example, if package.json has changed I know that I need to run "npm i" and if one the .sql files have changed I know that I need to run a script to update the DB schema. If I miss these then I can experience problems until I realize what has happened.
A couple of solutions that jump to mind:
The ideal solution would be able to modify the git config file either locally or globally to mark file patterns (same as .gitignore) so that after or during a pull action those files are highlighted for special attention.
Solutions?
Everybody is recommending you to use gits hooks, but I would actually take a build system approach.
For example, if your package.json changes, make a rule on your Makefile that depends on that and the action is to execute the required command.
This way, your system dependencies do not depend on your version control system, and you always see it happening when you call make or whatever build system you use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With