DEV Community

Vidip Ghosh
Vidip Ghosh

Posted on

Solving Adding another git repository inside another repository

I recently came across the situation where we push the project and as soon as we run git add . command, we get the following warning:

Image description

And when we push this project, we find that a submodule has been pushed into the project repository. The outer git repository ignores the inner git repository and the inner git repository is called the module.

I came across the solution for solving this:
Step1: run command ls -a (In git bash terminal)
Step2: run command rm -rf .git (remove .git)
Step3: Again, run git add . and commit the changes.

Related articles:
https://stackoverflow.com/questions/67962030/warning-adding-embedded-git-repository-when-adding-a-new-create-react-app-fol

https://gist.github.com/claraj/e5563befe6c2fb108ad0efb6de47f265

Top comments (0)