Github not picking up changes after removing .git folder from sub directory

Viewed 230

I have a project which has two directories frontend and backend.

Inside project I had a .git Initialized, however, I noticed that inside the frontend directory there was a .git file causing the white arrow to appear on the folder. I removed that .git folder. However, right now GitHub is not picking up any changes on the frontend directory. I was wondering how I can set it to pick up those changes?

my structure is:

project
--.git
--backend
--frontend
-----project_frontned_src
--.gitignore

When I go to project/frontend and run git add .

I get an error:

fatal: in unpopulated submodule 'frontend/project_frontned_src'
2 Answers

The nested git repository was probably configured as a submodule. Try navigating to project/, then running git submodule deinit frontend/project_frontend_src (documentation).

It appears you've removed the .git file from a submodule, breaking that submodule. You should restore the submodule via git submodule update frontend, and avoid removing the .git file.

Related