Skip to content

Instantly share code, notes, and snippets.

@drewdeponte
Created January 12, 2012 22:49
Show Gist options
  • Save drewdeponte/1603648 to your computer and use it in GitHub Desktop.
Save drewdeponte/1603648 to your computer and use it in GitHub Desktop.
gco and gco-
alias gco="export DREW_LAST_G_BRANCH=\`git branch | grep -E '\* \w+' | awk '{ print \$2 }'\`; echo \$DREW_LAST_G_BRANCH; git checkout"
alias gco-="export DREW_LAST_G_BRANCH_TMP=\$DREW_LAST_G_BRANCH; gco \$DREW_LAST_G_BRANCH_TMP"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment