Home > database >  Git react folder in Gitlab
Git react folder in Gitlab

Time:11-07

I'm going to make a git to my project include spring and react, as shown below:

the content in my project folder

after I create a local repo and just push this into gitlab as it told me: btw before I git push I have to write "git pull --rebase origin main", otherwise I can't push my repo to gitlab. But I think that is maybe not the reason. the process I have made to push the local repo to gitlab

And afterwards it has problem with the react folder in gitlab, and there is no problem with the spring folder, as shown below: I can't open the react folder in gitlab.

how it looks like in the gitlab

So my question was: why only the react folder has this problem but spring not? and how can I fix it? When I open the react folder by vs code, the version control tool also doesn't work when I made some changes.

Very thankful for answering!

CodePudding user response:

why only the react folder has this problem but spring not?

Because delivery-react is probably a nested Git repository (meaning there is a delivery-react/.git), unless you have a .gitmodules file in your main repository.

If you want to add delivery-react as a regular folder:

git rm --cached delivery-react  # no trailing /
git commit -m "Remove nested folder"
git add delivery-react
git commit -m "Add deliver-react"
git push
  • Related