Git Alias

Following are some of the common git aliases, people use. Add them to ~/.bash_profile

1
2
3
4
5
6
7
8
9
10
alias g='git'
alias gst='git status'
alias gs='git push'
alias gc='git commit'
alias gca='git commit -a'
alias ga='git add'
alias gco='git checkout'
alias gb='git branch'
alias gm='git merge'
alias gd="git diff"

An additional syntax highlighting can be provided as well with the following:

1
2
export CLICOLOR=1
export LSCOLORS=gxfxaxdxcxegedabagacad

Any questions on this, please feel free to ask. We’re here to help…

Comments

Comments