Our Beginner's Guide to Git vs GitHub: What’s the Difference?

Author profile photo for CareerFoundry author Nicole Abramowski.

For those entering into the world of coding, prepare for a lot of similar-sounding but different terms. Java vs JavaScript, C# vs C, Git vs GitHub…the list goes on.

While we’re not going to cover all of these terms today, with this guide you’ll emerge clear on what the last pair are and how to use them.

We’re first going to explore what web development is about, before looking at the version control system Git. Next, we’ll go into what the similar-sounding GitHub is and how you use it, before comparing the two.

Lastly, we’ll explain how you can use Git without GitHub, and the potential pitfalls of doing so.

If you’d like to jump ahead to a particular section, simply use the clickable menu: 

  1. What is web development?
  2. What is Git?
  3. What is GitHub?
  4. Differences between Git vs GitHub
  5. Can I use Git without using GitHub?
  6. Final thoughts

1. What is web development?

Take a look at anything you can view in an internet browser. All these websites are the result of web development.

There are three major categories of web development: Frontend, backend, and full-stack.

Frontend development includes everything you see on the screen and interact with. Backend web development involves storing and manipulating data by communicating with a database—the part of the application not directly accessed by the user. Full-stack web development includes both frontend and backend development tasks.

Let’s look at an example. Say you are looking for a pair of red pants on a store’s website. You decide to search “red pants” in the search bar. The design of the search input and how it looks is frontend web development. Taking a search query and returning the relevant clothing items is the role of backend web development.

Want to learn more? Our web development overview article will fill you in on the whole area and what it takes to get into it.

If you’re interested in learning frontend development, getting started is much easier than you think. Our free coding short course will have you building and styling your own website in just five days.

2. What is Git?

If you’re looking for a job as a software or web developer, Git is a tool you will work with daily. So what is Git? In short, Git allows developers to track changes to the files in their projects and work together.

Say you were working on some code and saved changes that caused a bug in your project. You don’t remember what the old code looked like to change it back. Oops—what do you do now?

Enter Git, your version control system. Git works in the background to record the changes in a special database called a repository. Here you can see who has made what changes, when, and why.

Using Git, you push your changes to the repository via a commit. You can also revert a commit to go back to a previous version of the code. Git saves the day! Learn more about how to do this in my beginner’s guide to the git commit command.

Git is free, open-source, super fast, and scalable. It’s not the only version control system out there, though it is the most popular one. Let’s talk about why. What makes Git so great, and how does it compare to other version control systems?

Version control systems come in two categories: centralized and distributed.

Centralized version control systems

In a centralized system, all team members connect to one server to see and work with the latest copy of the code. A significant pro to centralized systems is they are easy to learn. Yet, if the server is down, it means nobody can see or work with the code.

Distributed version control systems

With a distributed system, each team member stores a copy of the project on their local machine. If the server goes down, users can still collaborate with colleagues and work offline. Git is a distributed system.

While this means Git has a steeper learning curve to start, it keeps the code secure. Most importantly, it does not have a single point of failure like centralized systems do.

You can learn more in our complete guide to version control systems.

3. What is GitHub?

GitHub is a company that allows users to host their coding projects.

To use GitHub, you need to sign up on their website and make an account. Anyone can sign up and host a public code repository for free on GitHub. This makes it very popular for open-source projects. Companies or projects can also pay for extra features and security offered by GitHub.

GitHub provides many tools on top of hosting coding projects. These tools make the development process easier and more secure within a company or team. Two major GitHub features you’ll use as a developer are pull requests and code reviews.

Pull requests are a way to submit your code to the main codebase. When you finish working on a feature, you will open a pull request, like making a draft of your code visible. Your colleagues can then proofread and/or test your code, called a code review. It’s common that a project or company requires a code review before allowing someone to merge their new code.

During a code review, your colleagues can look at your code to make sure it’s safe and efficient before it gets merged into the repository.

A repository, or “repo”, is the location where a company stores all the files and code for a particular project. This helps prevent bugs in the web application, and provides a backup so code will never be lost.

You can learn more in our closer look at what GitHub is.

4. Differences between Git vs GitHub

If Git is the system keeping track of changes and versions of your project, GitHub is the home to that system.

Github is a web application that hosts Git. It’s an online database where you can share your Git version-controlled projects. This collaboration happens with others in the cloud, outside of your local computer.

Both Git and GitHub give developers useful version-control tools. Developers can build out their projects without worrying about messing things up. GitHub adds more functionality on top of this. For example, a place to store the projects in the cloud and more tools to better collaborate.

Three major tools are pull requests, issues and code reviews.

GitHub as a social network

The social networking aspect of GitHub is another powerful feature. Each user on GitHub has their own profile that shows the projects to which they contribute and how often. If the projects are public, the code they contributed is also visible.

This makes GitHub an important tool during any web development job search. Looking at someone’s GitHub profile, you get an idea of them as a developer. How long they’ve been coding, what kind of projects they’ve worked on, and what it might be like to work with their code.

You can also submit a GitHub issue to an existing project. This might be a bug, feature request or a question. Here a discussion on the issue gets organized, details sorted out and prioritized.

Forking

See an open-source project you think you can improve or use as a basis for another project?

Another GitHub tool useful to you is forking. When you “fork” a repository, you make a copy of the entire thing to your own GitHub account. You can then build on top of it, improve and/or customize to your liking.

For example, let’s say you want to make a forum for your favorite fandom. Find an existing forum project on GitHub, fork it, and customize it to your liking. Add the colors, images and style of your fandom, for example.

Have an idea for a cool feature? Write the code to expand the existing project and add what you think your users would appreciate. Notice a bug? Go ahead and fix any inconveniences you found in the original project.

5. Can I use Git without using GitHub?

Yes, Git is independent of GitHub. You can still maintain local version control without GitHub. This means tracking different versions of the code and project history.

If you’re only using Git locally on your computer, keep in mind your project is not saved to any server. This means no saved backups if something goes wrong with your device. It also makes it difficult to share and collaborate with others on the project.

6. Final thoughts

Git and GitHub are two terms you will see a lot in web development. Whether you work as a frontend, backend, or full-stack developer, they will be an integral part of your flow.

The terms might seem overwhelming at first. Pull request, merge, push, review, fork, repository—what do they even mean?! Don’t worry, you will quickly get used to the jargon and learn to appreciate these services.

Not only do you learn by reviewing your colleagues’ code, you also gain the ability to undo almost anything. The peace of mind to know you won’t ruin your employer’s product with an ill-thought out piece of code? Priceless.

If you’d like to learn more about the world of web development, check out these articles:

What You Should Do Now

  1. Get a hands-on introduction to web development and build your first website from scratch with our free, self-paced Web Development Short Course.

  2. Take part in one of our FREE live online web development events with industry experts, and check out recent graduate Tanimara’s successful career-change story.

  3. Become a qualified web developer in just 5-10 months—complete with a job guarantee.

  4. This month, we’re offering the first 100 students a partial scholarship—worth up to $1,425  off—on all of our career-change programs 🎉 Book your application call and secure your spot today!

What is CareerFoundry?

CareerFoundry is an online school for people looking to switch to a rewarding career in tech. Select a program, get paired with an expert mentor and tutor, and become a job-ready designer, developer, or analyst from scratch, or your money back.

Learn more about our programs