0

I have enough big project (MERN)

/Todo
--/client
   --/here is react app
--/server.js
--/others folder for server

When I run git add . git throws this error:

warning: adding embedded git repository:Todo/client

What should i do?

AlBlue
  • 23,254
  • 14
  • 71
  • 91

1 Answers1

2

This is a warning; your Todo/client folder already appears to be a git repository, so it's throwing you this as a warning. I expect that it isn't actually adding it, but that it's telling you so you can decide what to do.

In this case, it's not adding the client, and when you push it to another repository, you won't push that as well. When someone clones it, they won't have the client.

You could use submodules to solve this problem, or you can decide if it even needs to be a separate git repository and instead just add it as-is. Only you can make the decision as to what the solution is.

AlBlue
  • 23,254
  • 14
  • 71
  • 91
  • If you're interested, there's more on how to solve this in either way at https://stackoverflow.com/questions/47008290/git-how-to-make-outer-repository-and-embedded-repository-work-as-common-standal – AlBlue Jan 20 '21 at 12:10
  • I just deleted .git in client folder. Do you familiar with Heroku? I am trying to deploy my first mern app. Could you help me? – Бабенко Дмитрий Jan 21 '21 at 18:40