Learn to Code via Tutorials on Repl.it

← Back to all posts
Git alias list
KunalKamble (2)

Increase your productivity by simply switching the log terminal commands to short one, best approach is to use aliases.

You can update your .bash_profile file on your mac, if file does not exists you can create one using following command.

$ cat ~/.bash_profile

List of aliases which I am using for the Git

alias gs='git status'
alias ga='git add'
alias c='git commit'
alias gps='git push'
alias gpl='git pull'
alias gpr='git pull --rebase'
alias gaa='git add .'
alias gcm='git commit -m'
alias gpo='git push origin'
alias gco='git checkout'
alias gcb='git checkout branch'
alias gst='git stash'
alias gsa='git stash apply'
alias gsp='git stash pop'
alias gsl='git stash list'
alias gr='git rebase'
alias grc='git rebase --continue'
alias gf='git fetch'
alias gl='git log'
alias gnt='git notes'
alias grs='git reset --soft'
alias grh='git reset --hard'
alias gca='git commit --amend'