Configuration

Optimize your Git workflow with a personalized global configuration, from setting user credentials to defining time-saving aliases, ensuring a seamless and efficient version control experience.

Set Your Name and Email Address

1
git config --global user.name "Your Name"
1
git config --global user.email "[email protected]"

Configure Line Endings

  • For Windows users:
1
git config --global core.autocrlf true
  • For macOS and Linux users:
1
git config --global core.autocrlf input

Default branch name

1
git config --global init.defaultBranch main

Editor

  • In this case I added Visual Studio Code as Code/Text Editor
1
git config --global core.editor "code --wait"

Coloured Output

1
git config --global color.ui auto

Pruning during fetch

1
git config --global fetch.prune true

References