Setup Git Repo

Initialize Git Repo

Create repository on cloud host and get url

Open terminal on local machine

Create directory

mkdir <folder-name>

Navigate to folder

cd <folder-name>

Initialize git repository

git init

Create initial commit

git commit --allow-empty -m 'Initial commit'

Set remote url location of cloud repository

git remote add origin <url path>

Push repo and set default upstream repo and branch for pushing

git push --set-upstream origin <branch>

Setup initial repo files

Create gitignore

npx gitignore <template>

Create README.md

echo '<Project name>' >> README.md

Commit files

git add .
git commit -m 'Adds gitignore and README'
git push

Next:
Setup Node