GitHub is an essential tool for Computer Scientists today. It is similar to Google Drive but for coders. It allows you to collaborate with others when coding. Most importantly, it allows you to manage and organize your code. There are so many additional features that GitHub offers. For our use, it hosts your websites for free without much work on your part.
Now you are ready to create your account! Visit GitHub to create your free account.
So you have now made your account. In order to make your first repository or digital storage space where you can keep your code and host it, you must navigate to the home page of GitHub and click on “Start Project”. Fill in all of the required fields. You will see a box for initializing your repository with a “README” A README is just a text file that can explain how to use your code or what is in your code. Make sure you check this box so you can get used to having a README.
You are all set up for your future projects! We are assuming you are at least a little familiar with the Command Line now that you have moved on to this tutorial!
If you have completed a project and want to save your code to GitHub and upload it straight from the command line to GitHub follow these steps:
git branch *nameofbranch* --- Make a new branch
git checkout *nameofbranch* --- Switch to branch
git push origin *nameofbranch* --- push files to a branch
git pull origin *nameofbranch* --- retrieve files from a branch