Skip to content

Instantly share code, notes, and snippets.

@ckarnell
Created June 30, 2017 17:56
Show Gist options
  • Save ckarnell/1b5d329b0fbeaed0f85abc226949c5b0 to your computer and use it in GitHub Desktop.
Save ckarnell/1b5d329b0fbeaed0f85abc226949c5b0 to your computer and use it in GitHub Desktop.
Git shortcuts with completion support
# These go in .bashrc:
alias gpsu='git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
alias gco='git checkout'
alias gr='git rebase'
# These go in .git-completion.bash, at the bottom, I guess:
__git_complete gco _git_checkout
__git_complete gr _git_rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment