I have my own website, within that website I want to showcase my projects. My website files is synced to a remote repository in github named "personal-website". I started to make projects, I want to somehow make a separate github repository for each of them.
as you can see here, my projects are inside the project folder. I want to make a repository for each of them. But I already have a .git file on my website, if I added one to "palindrome-checker" project and push the files on it into a separate repository, would it produce errors? is there any other method?
I would like to make a separate repository for each project, then push there the project files, but still there is a copy of those files in my main website.
There is a thing called submodule in git which allow you to create sub repos of a main repo. For Example
You have a .git folder in you main Personal Website folder which hold projects folder.
you have to create different repositories for each project inside the projects folder and then add these repos point toward its folders like this
git submodule add /url/of/sub/repo/bmi-calculator ./projects/bmi-calculator
Like this you can connect all the project folders to its repos and these repos are connected to you main repo and when main repo is cloned then you can init these projects again