Tell Git who you are once, and set the defaults every later lesson relies on.
Every commit records an author. Set your name and email before your first commit:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Use the email of your GitHub account so your commits are linked to you.
/etc/gitconfig~/.gitconfig.git/configThe most specific level wins: local beats global, global beats system.
# name new repositories' first branch "main"
git config --global init.defaultBranch main
# the editor Git opens for commit messages
git config --global core.editor "code --wait"
# what git pull does when histories diverge
git config --global pull.rebase false
The last one is explained in Divergence and Conflicts.
# one setting
git config user.name
# everything, and which file each value came from
git config --list --show-origin
Next: the basic workflow.