Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git status "fatal: not a git repository (or any of the parent directories): .git"

I am collaborating with my teammates on a Project in which one of my teammate has uploaded our project on GitHub.

I want to clone the repository into my VS Code.

Here are the steps I have performed:

  1. I clicked the "Fork" button on the top right corner of my teammate's repository.
  2. Then I go to "Your Repositories" and clicked the repository in which I have forked just now.
  3. Then I clicked the Green Button "Code" and copied the URL of my repository.
  4. Next, I go to my VS Code and typed git clone <URL> in which the URL is the URL that I have just copied.
  5. Then my VS Code Terminal shows this long message:

Screenshot 1

  1. Then when I run git status, the output is fatal: not a git repository (or any of the parent directories): .git as you can see at the bottom of the screenshot.

May I know did I do any mistakes? What are the correct steps to rectify the issues displayed by the Terminal? Thank you.


1 Answers

You need to be present in the active directory in which the git repository was cloned.

cd into the downloaded directory then VS Code will automatically get updated with the current repo.

Try using extensions like Git lens and other git-related extensions that make this process easier.

like image 152
Surya Teja Pasumarty Avatar answered Oct 18 '25 10:10

Surya Teja Pasumarty



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!