Created
March 1, 2011 12:29
-
-
Save wayneeseguin/849058 to your computer and use it in GitHub Desktop.
Git checkout function that triggers project .rvmrc to be reloaded
This file contains hidden or 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
| # | |
| # Call git checkout | |
| # | |
| gco() | |
| { | |
| git checkout $* | |
| if [[ -s .rvmrc ]] ; then | |
| unset rvm_rvmrc_cwd | |
| cd . | |
| fi | |
| } | |
| # Usage Examples | |
| $ gco my_branch | |
| $ gco -b my_new_branch | |
| $ gco -b my_new_branch -t origin/new_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment