-
-
Save magnusstahre/4022642 to your computer and use it in GitHub Desktop.
Post Checkout git hook to remind me about running certain commands when appropriate files have been modified
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if ! git diff-tree --quiet $1 $2 -- Gemfile | |
then | |
echo "\nGemfile modified: run \`bundle install\`\n" | |
fi | |
if ! git diff-tree --quiet $1 $2 -- db/migrate db/schema.rb db/structure.sql | |
then | |
echo "\nSchema modified: run \'rake db:migrate\'\n" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment