My Git aliases

by Jason Swett,

It pains me every time I see someone fully type out git commit. You can save a whole bunch of typing and cognitive energy by aliasing common git commands to shorter versions.

Here are my Git aliases if you’d like to use them. I use Zsh so I put these aliases in my ~/.zshrc file.

alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gca='git commit -a'
alias gd='git diff'
alias gdc='git diff --cached'
alias go='git checkout '
alias gk='gitk --all&'
alias gx='gitx --all'
alias gpom='git push origin master'

One thought on “My Git aliases

Leave a Reply

Your email address will not be published. Required fields are marked *