Config Git Default Setting

Some Git configurations I need to set every time I re-install OS, cygwin or in a new system

User Name
git config --global user.name "Your Name"
User Email
git config --global user.email you@example.com
Default Editor (I prefer vi)
git config --global core.editor vi
Colorized Git Output (when using a terminal)
git config --global color.ui auto
Pager Indentation Width (I like it to be 4 characters)
git config --global core.pager 'less -x4'
Sample output of 'git diff HEAD~' when color.ui is set to auto
HEAD is at https://kernel.googlesource.com/pub/scm/git/git - 2ae48a9bb87193de9e9da10abd9e7286c0e4c43d
git running in cygwin on Win7

Edited on 2015.03.27: Added "Pager Indentation Width"

No comments: