This seems like the simplest Git question, but I can’t find ANYTHING on it.
So for a newbie to Git, I know how to add, commit, and then push files to my GitHub account. But how do I then create a new project and switch between working on that repository and my old repository? Will cd’ing to the appropriate directory and then remote adding each time work, or could I just cd and push immediately? That seems really tedious. I think I’m missing a fundamental point of Git.
A git project is fully self-contained within its root directory, so
cding to another directory with its own git project is switching to another project.As to the Github part:
Github hosts a copy of the repository for each project, so it makes sense that you have to setup the remote links for each project – they have nothing in common with each other, so they each need the remote link to the repository on Github.