how to create initial git repository code example
Example 1: how to initialize a git repository command line
# New local repository
git init
git add .
git commit -m "Initial commit"
# New remote repository
git remote add origin [email protected]:username/new_repo #ssh
# Now push
git push -u origin master
Example 2: git create new repo
echo "# TicTacToe" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Sandox/TicTacToe.git
git push -u origin main