Problems with Git

In the article Getting Started With Git and GitHub there is an exercise about setting a new repository. I create the README.txt as per the instructions, but when I try to execute step 5 of the Try It Out! list, I get error message “fatal: not a git repository”. I get the same message with any git command after that. Then I try pushing an existing repository to GitHub by copying and pasting the command line, and I keep getting the same error message. What should I do?

The error would suggest that you’re not working in a folder which has a Git repo.

Did you correctly run the git init? You’ll know if you did, because it creates a .git directory.