Git warning: embeded repo

Viewed 129

I am having an issue with git. All i am trying to do is to upload react app in folder.

I am using the following:

npx create-react-app task_4_1

After that, I changed the src folder files for my purposes and tried to push to git existing folder.

The warning I get:

PS C:\Users\Robert\Desktop\New folder> git add .
warning: adding embedded git repository: task_4_1
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: 
hint:   git submodule add <url> task_4_1
hint: 
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint:   git rm --cached task_4_1
hint:

If i follow git commands after all it creates in git see pic below

pic

All I want is to have my app in a folder. As more folders are going to come here later as learning steps.

Tried to search for answers here. None of the solutions actually helped. None were same problems.

updated

I want it to be this way

in Folders

so I can have 2-8 different react apps in one repo.

If I do all the commands in root folder it comes like so

without folder

and when I will continue to add new apps down there it will be a huge mess

And if I delete .git File from root that will mean that all node_modules will be uploaded to git as well, Don't we try to avoid that ?

1 Answers

You accidentally create two git files. Just make the structure as the default create-react-app, then in the root folder execute git init.

Related