FahamLah

Commands

git config

git config [--global] <key> <value>

Risk: Safe

What it does

Reads or changes Git settings.

When to use it

Once, when you set up a new computer.

Example

$ git config --global user.name "Aiman"

Tell Git your name, for all projects.

$ git config --global user.email "aiman@example.com"

Set your email.

$ git config --global init.defaultBranch main

New repos start on main.

$ git config --list

Show all your settings.