Git is the tool that handles your version control, GitHub is the online repository where you store all your files. Version control records specific changes to a file or a set of files over time so that you can access specific versions later. GitHub stores these versions on the cloud. Since you can add multiple people to a GitHub repository, it’s also an excellent way to collaborate with others on projects. You should try this awesome simulation version of this tutorial here. Then you should make your Github account with your school email.
Unix is how your operating system is organized. Everything is organized into a hierarchy similar to a tree. Everything starts in the root and goes up to the leaves-files. Files are contained in folders called directories. You get to a file through a path of directories. $
acts as a colon, and -
denotes the root.
Terminal is your text-based access to the operating system. It carries out Unix commands. Here are some helpful and common Unix commands:
ls
: graphically shows the current directorycd
: change directorycd ..
: takes you one level up from the current directorymkdir
: make directory (creates new folder)touch
: creates a filerm
: remove files, use this command wiselymv
: moves/renames filespwd
: prints path to the current directoryFeel free to try some of these commands, and look up others to see how they work.
Now that we have a basic understanding of Terminal and Unix commands we can set up git. Go here to set up Git. You have already completed step 1. We highly recommend setting up an SSH keypair with your computer to allow more ease of use with Github. You can do that here. A few things to know about using Terminal: if you enter something and there is no message afterward that usually means it has worked, and when typing in a password it will not appear that you are typing anything, but this is also working.
As said before, a repository is where your code is stored on GitHub. You can make a repository following instructions. You can also see instructions on how to commit a change from Github itself.
This assumes that you have set up an SSH keypair with your computer.
cd
) to where you want to keep the repository.git add .
git commit -m "a message about what you will be pushing"
git push
If you check your Github, you will see that the files have been updated and/or added.
Forking a repository is something you’ll want to be able to do to collaborate with others on repositories. Github’s instructions on forking a repository are here.
Their instructions also walk you through creating a branch. All files in a repository automatically end up in the master branch. However, if you would like to make some changes to the main code without damaging parts of the code that are working then you can create another branch and later merge it. When you’re done making edits you can merge this other branch with the master branch again.
Go to to do more interactive tutorials!
Webpage hosting is what actually puts your website on the internet. Many places offer hosting for a price but Github will host your webpage for free. You can see their instructions for hosting websites here
Here is another excellent guide to Git!