Created
October 10, 2020 01:24
-
-
Save nopolabs/74f5463dc6db51b6af73e1b873e4f5d5 to your computer and use it in GitHub Desktop.
Some of my favorite git aliases
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
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