I have a folder on my Desktop called GitHub. In this GitHub folder are all my repositories which I would like to host on my GitHub remote page (sorry if I get the terminology wrong, by remote page I mean, I want to see each of these folders as a repository on my https://www.github.com/abhishekbabuji page.
Now everything was fine, I followed an online tutorial... But I think I really messed up somewhere.
My questions are the following:
Should there be a .git
. inside every single one of the folders/repository? or should there be JUST ONE .git
file in this main folder of mine like in the picture and NO .git
inside ANY of the folders? I'm given to understand that .git
is used to TRACK the changes you make, and you need not have one inside every repo.
Before I push, it looks like I have to set up a remote url as git remote add origin <REMOTE URL>
where the <REMOTE URL>
is a PATH TO ONE REPO.
But this is where I'm having the most trouble.. If the <REMOTE URL>
is a PATH TO ONE SPECIFIC REPO, wouldn't that mean that every time I make changes, ALL the changes that I make inside these 6 folders you see in the image GO INSIDE THAT SINGLE REPO, instead of there being 6 separate REPOS?
How do I add a <REMOTE URL>
ensuring that all the changes go into their 6 respective repos when I do git add .
, git commit
and git push
from the current directory GitHub
? I'm willing to make whatever changes I need to ensure I get this right, changes in directory arrangement, changes in .git
location, anything. I just want to make sure that there are 6 separate repos on my GitHub page (It currently exists as of now, but I don't know what happened, when I tried doing git push
, it started to say that the repo destination does not exist)
From git's perspective, there's no relationship between these six folders. Each one should have its own .git
folder, and for each one you should run git remote add origin <url>
separately.