Is there a way to show that folder structure in git? I'm struggling to visualize how it looks in git and how we would push that structure to git. Are there instructions for how to create the structure on our computers then push it to git?
Git is a version control tool. For example when you write an essay you have many versions on your desktop, for example 5 versions. You might decide that essay #1-3 are no good and put them in a folder called "rough_draft" and put essay #4 and #5 in a folder called "final_edit".
In this case you are versioning/controlling what versions you want manually.
However, when you code and have many sub-folders within a main folder and multiple files, it is not possible to manually control what versions you want. Unless you copy paste the project folder and it's contents each time that you make a change. Which is tedious and impracticable when working with teams.
Therefore, using a version control tool like git is a good choice. Git provides you with a workflow to code without worrying about if the latest version of your code has been saved. Git only stores a snapshot of your current changes , it's like a camera that will take a picture when clicked of any changes that you make in any file in whatever folder they may be.
So git does not organize your files or folders. That you will have to do manually. Git will only take "snapshots" of changes of your files. If you move files around into different folders, it does not matter.
Github is an online platform where people can upload their code. This is called pushing. It's like saving pictures in an album and then uploading the album to facebook.
To do this the easy way:
- Make an account on github.com
- Make a repository
- Name your repository and "click on create repository"
- Click on "uploading on existing file"
- Now you can either drag or drop your files into the middle area or click on "Choose files" AND then click on the green "Commit changes" button
You will be redirected to your repository OR project folder on github if you may, where you will now see your file uploaded on github.com in your repository