-
-
Save ilyaashapatov/69a95dc3a4a31d4f22e5 to your computer and use it in GitHub Desktop.
git shortcuts
This file contains hidden or 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 g='git' | |
alias gst='git status' | |
alias gc='git commit -a -m' | |
alias gco='git checkout' | |
alias gcm='git checkout master' | |
alias gb='git branch' | |
alias glg='git log --stat --max-count=5' | |
alias ga='git add .' | |
alias gsh='git stash' | |
alias gsha='git stash apply' | |
alias gd='git diff' | |
function current_branch() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo ${ref#refs/heads/} | |
} | |
alias ggpull='git pull origin $(current_branch)' | |
alias ggpush='git push origin $(current_branch)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment