Last answered:

10 Jan 2022

Posted on:

27 Dec 2021

0

I am getting a 'fatal' error when adding my repository.

When adding the 'git_practice' repository as origin, I am getting the message: "fatal: not a git repository (or any of the parent directories): .git'. I made sure I was pasting the HTTPS URL. I also tried to copy the URL of the repository directly from the browser (as the protip says on the GitHub website) but still got the same error message. Why is it not working?

I am on the 2.34.1 version of Git on Windows.

1 answers ( 0 marked as helpful)
Instructor
Posted on:

10 Jan 2022

0

Hi Naiya!
Great to have you in the course and thanks for reaching out!
Can you please provide a screenshot containing the troubles you've encountered?
Such errors typically occur when a Git command is run in an unfamiliar Git directory. To fix this, you have to make sure you both work in the correct folder and that you set up your repository right by initializing it with git init.
Best,
Ivan

Submit an answer