[Answered ]-Having git problem in React django project

1πŸ‘

βœ…

You are seeing that error because you have a git repository nested inside another repository.

Your main project directory projectname has a .git directory, and the directory nested inside it frontend has another .git repo that create-react-app created. The git repo inside another repo is called a submodule. It’s possible to work with submodules, but it has its own quirks.

The easiest way to get around your error is to use only one git repo in your main project directory and delete the .git directory inside frontend directory. Try the following steps:

Go into the frontend directory.

cd frontend

Delete the .git directory inside frontend directory.

rm -rf .git

Go back to your main project directory.

You should now be able to track all files inside the frontend directory inside your main directory.

πŸ‘€Stanley Ulili

0πŸ‘

Maybe your react project i.e. frontend is also a git repository. So, what you can do is, put the frontend on the outside of the projectname folder and use the API key that you have from the backend in the frontend for your work.
You can follow this link:
https://www.digitalocean.com/community/tutorials/build-a-to-do-application-using-django-and-react

πŸ‘€Nitish Kumar

Leave a comment