mdawar.dev

A blog about programming, Web development, Open Source, Linux and DevOps.

Git Initial Setup

git config is used to set configuration variables that control how Git works.

Using the --global flag sets these config variables for the current user and writes them to ~/.gitconfig or ~/.config/git/config.

Set the User Name and Email

bash
$git config --global user.name "John Doe"
$git config --global user.email johndoe@example.com

Set the Default Branch

bash
$git config --global init.defaultBranch main

More info: First-Time Git Setup