lorenos lorenos - 3 months ago 11
Git Question

On git status I'm getting the subfolders of the main folder i want to add

I want to add the main folder "my_project" to my bitbucket account, but on git status I'm getting the subfolders of the folder "my_project". So when I type in

git add
my_project im getting an error. How can I get to be displayed in the cmd the main folder "my_project" and not the subfolders of it? Can anyone help me?

I have tried with git reset and other stuff but it didn't help me.

Here I'm getting the subfolders of my_project and I don't have only my_project folder that contains the subfolders.
enter image description here

Here is the folder my_project on C disc

enter image description here

Answer

Delete the .git directory from your home directory.

rm -rf .git/

Then go to your project directory

cd my_project/

Now initialize git repository

git init
git status