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

$git config --global "John Doe"
$git config --global

Set the Default Branch

$git config --global init.defaultBranch main

More info: First-Time Git Setup