Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot git add my project created with create-react-app

I created a a folder called Tiendas_Unison_WEB in which i have my application, here i have 2 subfolders: client and server.

enter image description here

In my server folder i have an app created with express and node, this is fine, no problem with that. In my client folder i have a react app created wit "npx create-react-app" and i'm having issues with this one. What I did was "git init" on my parent folder "Tiendas_Unison_WEB", but when doing "git add ." I get the following warning: enter image description here

I've searched for answers and solutions but I haven't been able to find them. I dont know if I should have my client folder and my server folder in different repositories, maybe that's the problem. Any hint that might help me would be appreciated

like image 945
Manuel Duarte Avatar asked Mar 13 '26 05:03

Manuel Duarte


1 Answers

Warning message tells, that client folder itself is already git repository. Open the folder, and check for hidden .git file; I guess it will be there. So if you'd like to keep client folder as git repository - then add it as git submodule to your main repository (for that you need to know its remote address, e.g. url of the git server); or if you do not want it, simply remove .git file from the client folder.

like image 104
kosist Avatar answered Mar 15 '26 19:03

kosist



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!