Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Notify of file changed after git pull
#!/bin/sh -eu
# This file goes in .git/hooks/post-receive
if git diff-tree --name-status -t -r --root HEAD | grep -q 'development.sql'
echo "Your db/data/development.sql file changed. You may want to run rails gs:load"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment