My problem is, whenever I try to push to my repo I get the following icon (shown in picture) also, it is not clickable so I can't even navigate to the folders inside that folder. In the folder there should be all spring boot files. Reference
the structure of my project is something like this Main_foler-> subfolder-> Spring boot project
CodePudding user response:
You can't click on the submodule as a folder, because a submodule isn't a folder.
They're not really interconvertible either, any more than it would be possible to convert a book to a page. A submodule is a pair: first, it has a reference to an entire book, as it were: every commit in some other repository. Then, it has a reference to a specific "page" in that "book": After you've cloned the whole repository, go to commit cfe9da13...
or whatever.
Now, it's possible that you don't care to have whoever clones your repository, also clone the submodule repository and then go pick out one page. You'd like to, as it were, paste that one page directly into your repository, making it look like there's just the one book: Nothing else to see here, don't go look in the library for more books!
You can do that. Just tear out the one page, as it were. Remove the other repository! Keep only the checked-out files (the "one page"). Now you have a folder (an ordinary directory: not a repository) within your working tree for your Git repository. You can now add all the files within that folder.
Note that once you have done this, you no longer have access to the rest of that other repository. You threw it away. You removed it! It's gone! If you find you wanted some other commit after all ... well, too late. If you have another copy of the repository somewhere else, you can clone that, and check out that other commit, and then copy all the files in ("swap out the one page" as it were) and commit those files in your repository. But with this setup, you no longer have a submodule. You just have some files now.
If that's what you want, do that. If not, don't do that. That's what the difference between submodules and non-submodules is.