Introducing Git and GitHub

Version control is the practice of tracking and managing changes to different versions of software. It is similar to version history in Google Suite or Microsoft Office products (e.g. the ability to view previous changes to a Google Doc or Sheet), though more powerful.

Imagine you have a website that has already been deployed to your domain. You want to make a change to make the website look nicer. You make the change and deploy again. But now the website is completely broken. With version control, you can revert to the last working version of the code and compare versions to see what went wrong.

Git is the most commonly used version control system. It was created by Linus Torvalds, the creator of the Linux operating system. There are other version control systems such as Mercurial, and some companies even use their own proprietary version control.

GitHub is a cloud-based Git repository hosting service. A repository (often shorted to “repo”) is essentially a folder that contains your project. GitHub allows you to remotely access your Git repositories, and share your code with others. By sharing your code, other people on your team can view your code or even make edits.

At The Michigan Daily, we use GitHub for all of our projects. GitHub isn't the only git repository hosting service; others you might encounter include GitLab and BitBucket. Git skills and commands you learn here will be applicable to all of these services.

Differentiating between Git and GitHub

It’s a good idea to know the difference between Git and GitHub.

<aside> 💡 Git is local. That means you can use it without the Internet, without connecting to a repository on GitHub. It allows you to manage version control within a specific local directory. Technically, the content that you manage doesn’t have to be code-related.

GitHub is on the Internet. Once you have a local folder that has Git version control, you can use git to put it on the Internet (i.e., on GitHub, or any other Git repository hosting service). From there, others can view your code, copy it, make their own changes, and even submit requests to update your code.

</aside>

The tl;dr version of it is this: everything you do on your computer is probably through Git, except for pushing/pulling to GitHub. Everything you do on the Internet is through GitHub.

Differentiating between git and Git

Git is a particular specification of how to handle version control — the ideas of how version control should be implemented.

git is an implementation of Git written in C. It is the most popular implementation of Git. There are implementations of Git written in other languages.


To get ourselves familiar with git and GitHub, we’ll be:

  1. cloning a repository from GitHub,
  2. making a few changes,
  3. adding and committing the changes,
  4. pushing to GitHub