Last active
March 10, 2016 20:11
-
-
Save heybenchen/4effc7553dad89e23b36 to your computer and use it in GitHub Desktop.
Git Checkout by Branch Index
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
| function gc() { | |
| git branch | sed -n $1p | xargs -n 1 git checkout | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add to your .profile or .bash_profile
Usage: