Skip to content

Instantly share code, notes, and snippets.

@nopolabs
Created October 10, 2020 01:24
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 nopolabs/74f5463dc6db51b6af73e1b873e4f5d5 to your computer and use it in GitHub Desktop.
Save nopolabs/74f5463dc6db51b6af73e1b873e4f5d5 to your computer and use it in GitHub Desktop.
Some of my favorite git aliases
alias gs='git status --short --branch'
alias gbl='git branch --list'
alias gbm='git branch --merged'
alias gcb='git checkout -b'
alias gpu='git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
alias gri='git rebase -i'
function _git_checkout_track_origin() {
git checkout -t origin/${1}
}
alias gto=_git_checkout_track_origin
function _git_lg() {
git --no-pager log --graph --oneline -n ${1:-10} ${2} && echo ""
}
alias lg=_git_lg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment