What's GitHub?

Version Control and Why You Want It

Posted by 'Tine Zekis on April 12, 2015 · 3 mins read

Assignment: Technical Blog | Git Bloggin'

This post is about GitHub, an excellent tool for version control. If you're new to coding (like I am), then version control is probably a new concept, so let's unpack that here. Version control is a system for storing many versions of a thing. For example, if I am writing a book, I might use version control to store previous edits. This way, if I decide that a particular change isn’t working, or if I make a mistake like deleting a paragraph and saving, I can go back to a previous version and have access to the content I want back.

So why use version control when coding? Well, through multiple versions of a project, we can actually track all of our changes. Tracking changes is like getting to a checkpoint in a video game. It allows you to go back to where you were before if something goes wrong without having to go all the way back to the beginning. For instance, you may have some code that's working great, and then you add something that creates a bug. You may then want to return to the place you were before adding the problematic code and start working again from there.

git is a version control system that many web developers use to store multiple versions of a project. Using git, you can organize a series of changes into something called a commit. Think of each commit as one of those video game checkpoints. GitHub is an online tool that allows multiple people to work on the same project, contributing their own commits. Through this process, multiple people can have access to the same project at the same time and make changes without impacting one another. For instance, I could add a paragraph or a webpage while someone else edits the grammar on an existing page.

Probably the biggest advantage to you of putting your code on GitHub is that you might get stuck; having your code here allows you to invite others to review your code and submit their suggested edits. It's a great way for developers to put their minds together to work through problems. So if you think lots and lots of minds are better than just one, then storing your code on GitHub can be quite beneficial.

Quick Note: An important distinction between git and GitHub is that git is installed and lives locally on your own computer, whereas GitHub is on the web and viewable by multiple people. If you make changes locally, they are unavailable to others unless you actively push those changes to GitHub. Once you start learning more about git commands and the GitHub website, you can learn how to push your commits to the web.