How to Upload a New Project to GitHub
Goals
- I want directory structure on the initial computer and a second computer that clones the project to be identical, including directory names.
- What do I name the initial directory on the first computer?
- What do I name the project in Github?
- What folder structure do I create on the second computer before going through the clone process?
- From which directory on the second computer do I initiate the clone process?
Things I have learned.
- I used these instructions to guide me.
- See the section titled, "Adding a local repository to GitHub using Git"
- The Github project name is a folder on the local machine when you clone the project.
General Process
- On Initial computer initiate git from within project folder
-
Add files in your new local repository - otherwise known as staging. Here are a couple of ways to do that:
- Commit those changes.
- git commit -m "Initial commit."
- On Github, create a repository with the same name as the project folder on the initial computer
- Upload the changes to git using the instructions:
- git remote add origin <REMOTE_URL>
- git remote -v
- git push origin main
- On the second computer, don't create the project directory. That will be created during the cloning process.
- Go to the directory that will be the parent directory of the project to be cloned and clone the project.
- git clone <Github repository url>