Git tracking to wrong local directory

Viewed 409

I created a new directory 438-healthme and cloned a repo into it.

When I index into that directory on the master branch and run a git status it lists all of my computer's files as untracked (see screenshot).
It seems like I set up git wrong a few years ago--is there a way to fix this?

git status screenshot

2 Answers

Try again, removing that folder, and recreating it with:

git clone https://url/remote/repo 438-healthme

Then, in 438-healthme, there should be a .git subfolder, which means a git status (in the newly created 438-healthme folder) will show you files only from 438-healthme.

You must have run git init in a folder. You need to find it and run rm -r .git.

Related