Git init
git init turns the folder you are in into a new Git repository. It creates the hidden .git folder where Git keeps the history.
Your files are not tracked yet: add them with git add and make your first commit.
Create a repository
mkdir myproject
cd myproject
git init
Initialized empty Git repository in /Users/user/myproject/.git/
Choose the name of the first branch
git init -b main
Initialized empty Git repository in /Users/user/newproject/.git/