Need HELP with merging all repositories to one with subfolders

Hello, I am new to coding and as I am studying I have downloaded the GitHub Desktop Application and you guessed it, I have uploaded every one of my exercises to own repository. However at the end of the course there was lecture about github and how to use it, that is when I have faced my mistake, so now I am looking for a way to merge all my repositories to a single repo with subfolders for each exercise without losing those 4-5 months of activity on all the tasks from the course.

The best solution is to use Git submodules:

In other words, you create a new repository which become the main container of all the other repositories you want to collect, as Git submodules. Since Git submodules must reside in subfolders, they serve your purpose. That’s the good news.

The “bad news” (so to speak) is that you’ll have to take care of manually updating each submodule if you want to keep them up to date with the repository they point to. There are various “strategies” on how Git should update submodules, which you’ll have to decide, e.g. always point to the head of a specific branch, or manually select a commit or tag you want it to point to, etc.

Initially, working with submodules might feel a bit strange, because it’s an extra feature of Git that doesn’t quite feel like the rest of Git’s features. But you’ll soon get a grip on how submodules work, and they’re not all that scary after all.