Skip to content

Instantly share code, notes, and snippets.

@aminosan
Created June 2, 2016 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aminosan/e3cbe51743994a7273a248671aa47a70 to your computer and use it in GitHub Desktop.
Save aminosan/e3cbe51743994a7273a248671aa47a70 to your computer and use it in GitHub Desktop.
チェックアウトが楽になるやつ
#!/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
@aminosan
Copy link
Author

aminosan commented Jun 2, 2016

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment