Git terminal commands tutorials and documentations that are up to date with software

My current problem is that not all subfolders of my project aren’t syncing when I do git add and git commit and git push, only files in my root and some folders.

Inside the folders that aren’t syncing there is a .git folder which I don’t think should be there. I believe that the folder has somehow (probably from my own mistake) been added as what appears to be called a submodule. I have searched many guides about this topic and it says to delete something from .git/modules but that doesn’t exist on my hard drive. I have also tried git rm and git remove and pretty much everything i could find.

Now, if you can explain how to solve this particular problem - great. But I would prefer if you know of a manual that deals with these types of things, that I can use as a reference for the future. I have spent hours looking through tutorials and Q&As and google searching and nothing comes up that works or seems useful to me. I would like to avoid going through this process for the next problem, so please tell me where proper documentation can be found. I did not find anything that worked on the gitlab homepage.


The solution to the problem I had currently turned out to be to first manually delete the .git folder in the “submodule”, and then run git remove --cached -f from a terminal. Found this solution buried deep in stack exchange.

Still looking for a manual that actually functions as a problem solver for git.