Git global config

git config --global user.name "Your Username" 
git config --global user.email "[email protected]"

Optional

git config --global core.editor code 

Creating a new repository

git init
git add .
git status
git commit -m "first commit"
git branch -M main
git remote add origin <project link>
git push -u origin main

Push an existing repository

git remote add origin <project link>
git branch -M main
git push -u origin main

References