Skip to content

Instantly share code, notes, and snippets.

@himynameisjonas
Created January 11, 2011 20:59
Show Gist options
  • Save himynameisjonas/775131 to your computer and use it in GitHub Desktop.
Save himynameisjonas/775131 to your computer and use it in GitHub Desktop.
post-checkout git-hook
#!/bin/bash
oldrev="$1"
newrev="$2"
if [[ $3 == "1" ]]; then
diffresult=$(git diff "$oldrev" "$newrev" -- .rvmrc)
if [[ $diffresult != "" ]]; then
msg=" \n Don't forget to reload your .rvmrc! \n "
echo -e "\033[41;37m$msg\033[0m"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment