fatal: Not a git repository” when adding a Git repo

Using command line, go to the directory you what to add git repo then run the code below:

git init