Created
June 20, 2013 20:33
-
-
Save akesterson/5826348 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 | |
cd .. | |
GIT_DIR=.git | |
if ! [ -t 0 ]; then | |
read -a ref | |
fi | |
IFS='/' read -ra REF <<< "${ref[2]}" | |
BRANCH="${REF[2]}" | |
umask 002 && git reset --hard && git checkout $BRANCH && git reset --hard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment