Git config --global

Because of my work, I often have to switch laptops. So, almost each time I start a new project, I have to re-configure (among others), my git configuration.
So, here are my personnal config. Maybe it can be usefull to other :

# aliases
git config --global alias.co checkout  
git config --global alias.br branch  
git config --global alias.ci commit  
git config --global alias.st status

# autocorrect
git config --global help.autocorrect 10

# colors
git config --global color.ui true  

As you may be aware, git configuration can also be stored in two places:

  • Either in the  .git/config file of your project (the configuration will be working only for this project)
  • Or in .gitconfig file of your home directory (the configuration will be applied to all your projects but can be overrode using the first option)

My .gitconfig can be found here.