When starting with Git and GitHub, you might wonder what the difference is. Throughout the following few lessons, you'll get a breakdown of the key differences between Git vs. GitHub, as well as explanations of the concepts that you will encounter throughout this Git & GitHub tutorial.
What's the Difference Between Git vs. GitHub?
In short, Git is a type of software known as a Version Control System (VCS), which you can run locally on your computer to keep track of the different versions of your projects. GitHub is a cloud-based web service for hosting projects that are tracked with Git, where you can store and track your projects across different versions. Both Git & GitHub are used for version control.
Info: You'll get a more in-depth look at Git and GitHub in the upcoming lessons, What is Git? and What is GitHub?
What is a Version Control System?
Version Control is the practice of keeping track of different versions of a project you're working on. In software development, it helps track all the changes made to your code base. To make this practice easier, more secure, and more efficient, you can use a version control system, or VCS for short.
You can think of a version control system as a type of database. It keeps track of your files and the changes you are making, letting you see every modification you made previously. It allows you to manage and revisit changes made to the files over time. As you read above,
Version control systems also let you create branches in your project. A branch is a version of the project that split off at a certain point in time and developed, from there on, separately to another branch of the same project. A VCS helps you to track these branches independently of one another, as well as merge them back together if you want to combine the edits done on different branches. While doing so, it also keeps a record of who made which changes and when.
Info: As a real-life example of branching, think back to the example of creating multiple different resumes for different roles and companies. Each of these resumes could be a branch of the project.
Being able to efficiently keep track of both the edit history and multiple versions of a project is quite powerful, but there is more to version control that makes it such a widely applied concept:
Topic-Independent
Version control is independent of what kind of technology or framework you are working with. You can use a VCS to track the files in a book you're writing, graphics you're creating, software projects you're coding, or any other file-based project you're working on on your computer.
Tool-Independent
Version control systems work well with a wide range of operating systems. Furthermore, it doesn't care if you are working with a text editor, a fancy IDE, or any other tool. It lets you work with the tools you are comfortable with. It simply tracks the changes to the files you are working on.
What are the Benefits of Version Control Systems?
With this overview of version control in mind, here's a summary of the main benefits of using a VCS:
Reviewing
Stepping back in time and keeping a historical record of the code base
Branching
Creating and tracking different versions of a project alongside each other
Merging
Combining the changes done on different branches back together
Tracking
Tracing all changes to a given user and moment in time
The most popular open-source version control systems are Git, SVN, CVS, and Mercurial. Of those four, Git is by far the most popular modern VCS.
Summary: Git vs. GitHub
What's the Difference Between Git vs. GitHub? Here are the main high-level differences:
- Git was established in 2005, while GitHub was established in 2008
- Git is a version control system, while GitHub is a hosting platform for Git-tracked projects
- Git is maintained on your local machine, while GitHub is cloud-based
Version Control & Version Control Systems
- Version control is the practice of keeping track of different versions of your projects
- A version control system (VCS) is software optimized for version control
Benefits of VCS
- Topic-Independent
- Tool-Independent
- Reviewing
- Branching
- Merging
- Tracking