Git: Post-merge hook to detect when certain files have changed and display a notification

When certain files in a project change, the project needs to be rebuilt/restarted/recompiled. Using the following git hook, you can keep an eye out for changes in certain files then display a reminder message to perform an update or just make it run the command automatically.

It's just a simple bash script that's executed by git after a successful merge.

Use check_run() to run the script automatically, or check_warn() if you want it to only be noisy about it.

Store this in your_project/.git/hooks/ as "post-merge".

Automate things. Less room for errors and mistakes.

Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog