Created
June 2, 2016 01:52
-
-
Save aminosan/e3cbe51743994a7273a248671aa47a70 to your computer and use it in GitHub Desktop.
チェックアウトが楽になるやつ
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/bash | |
branches=`git branch | grep -v -e"^\*" | tr -d ' '` | |
PS3="Select branch > " | |
echo 'Branch list:' | |
select var in ${branches} | |
do | |
echo "git checkout ${var}" | |
git checkout ${var} | |
exit 0 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ls -la ~/bin || mkdir ~/bin;cd
/bin;curl -LO https://gist.github.com/aminosan/e3cbe51743994a7273a248671aa47a70/raw/b2b92ee5b86fc24ce60f46408b162249f86c3344/git_checkout.sh;chmod 755 ./git_checkout.sh;alias gitch='/bin/git_checkout.sh'