Install git
$ sudo apt-get install git
User settings
$ git config --global user.name "Dwayne R. Crooks"
$ git config --global user.email "[email protected]"
Core settings
$ git config --global core.editor nano
$ git config --global core.excludesfile $HOME/.gitignore_global
or you can use Sublime Text 2 as the default editor
$ git config --global core.editor "subl -n -w"
Contents of $HOME/.gitignore_global
*~
Other settings
$ git config --global color.ui true
Useful aliases
Add to .gitconfig
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
Add to .bashrc
alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit '
alias gd='git diff '
alias go='git checkout '