Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Reload .rvmrc after git checkout

View gist:2145979
1 2 3
# Put this is your .profile, .bashrc or similar to automatically reload your .rvmrc after git checkouts
 
git() { command git "$@" ; if [[ "$@" == *checkout* ]]; then [[ -s .rvmrc ]] && . .rvmrc; fi }

A small improvement:

git() { command git "$@"; if [[ "$1" == *checkout* ]] || [[ "$1" == *co* ]]; then [[ -s .rvmrc ]] && . .rvmrc; fi }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.