I have a git repository online and I use, as many do, to keep track of my programs. It worked all fine with the usual procedure from the root of my directory’s tree:
git add .
git commit
git push origin master
When one day I found a subdirectory in my tree have become green (on the git site) and was impossible to access. Now I know the green color is for a submodule (even if I have not understood what this mean) but I’d like it to be a real directory, one where I can view and download what’s there or examine modifications. The question is, how can I make this directory to become normal again, with all its subdirectory and file inside without touching the other directories inside the tree?
Thanks
The idea would be to:
git submodule update --init --recursive: see “How can I init/update git submodules in a remote?“The last link shows you how to dereference a submodule, while, if you want, preserving the history of the commits done in said submodule (but merging them back to the main repo)
Now if, when trying to init the submodule, you get the message:
Check the second part of “Git – how to track untracked content?“: the “Replace It with Plain Content” section.
The root cause is when you try to add a directory which is a git repo in itself within your main git repo work tree: