This is a general guide for how to configure, not what to configure. See link below for some fields.

Edit config directly

Open ~/.gitconfig in you IDE.

e.g.

$ code ~/.gitconfig

Edit config in shell editor

View or edit the config using -e for edit.

  • Local config:
      $ git config -e
    
  • Global config:
      $ git config -e --global
    

Set specific details

How to use the CLI to set values.

  • Local config:
      $ git config SECTION.SUBSECTION VALUE
    
  • Global config
      $ git config --global SECTION.SUBSECTION VALUE
    

Example:

$ git config --global user.name 'Name Surname'
$ git config --global user.email nsurname@example.com