I committed a repo where I used a PHP template from another repo I found on GitHub. I had to quickly commit my progress and move to another branch to continue work there and so I did.
A week or two later, I came back to this branch and it appears I have missed the fact, that I have committed a repo within a repo, causing the folder to appear on the GitLab UI with this little tiny orange folder
and Git icon right next to it. I found out that this means a submodule, which led me to the conclusion that I have done just the above described (I did not notice I could have had a nested repo inside my main repository until I read about submodules).
Now that I am back to this branch, I do not see any files on it. Clicking on the orange folder does not lead to anywhere. I have no idea what happened to my files, what I am sure though, is that I can see my commits via git log
, but once I click on them, it looks as if I have not committed any files, just this weird orange folder, that I cannot open, but just click on it without it showing any contents.
Are my files lost forever? Why were the commits possible at all, if so? Where have those files gone?
What I want in the end is to just have my files back in this directory, without any nested git repositories, just the global one containing all the folders.