DEV Community

Cover image for An  Introduction to Git And Github
Ritesh Kumar
Ritesh Kumar

Posted on • Updated on

An Introduction to Git And Github

Git and GitHub are at the core of open source in today’s programming world. However, there are a lot of confusing often seem about these terms, similar yet have different meanings and uses. Let’s demystify this confusion by decoding their underlying meanings

In this article, we’ll first explain
Version control
Then, we’ll dig into more about Git and GitHub.

A quick aside: git is not the same as GitHub. Git is an open-source version control tool that was developed in 2005 by Linux developers; GitHub is a company that produces software that integrates with git and was established in 2008. You can use git without GitHub, but you can't use GitHub without git.

Alt Text

What Is Version Control?

Version control refers to the practice of tracking and managing changes to software code, and Version Control Systems refers to software tools that assist software teams in managing changes to source code over time. It allows developers to monitor and handle modifications to the code of a software project.
Version Control becomes more important as a software project increases in size. Version management enables developers to deal safely with splitting and combining.
A creator uses branching to repeat a portion of the source code (called the repository). The developer will then easily modify the section of code without disturbing the remainder of the project. When the developer’s part of the code is running well, he or she will integrate it back into the main source code and make it official. Many of these modifications are then monitored and, if necessary, may be undone.
Alt Text

What is Git?

Git is a commonly used Version Control System (VCS) that allows you to keep track of all the code changes. This means you can simply roll back to a previous update if a new function causes problems.

Git, on the other hand, isn't just any VCS; it's a Distributed VCS. This means that each project partner would have a record of the modifications made to their own computer. As a result, people will focus on various aspects of the project without having to connect with the website that hosts the remote version. This is extremely effective, and any modifications made to the project can be quickly merged with the remote copy.
Alt Text

What exactly is GitHub?

Git is at the heart of GitHub, a commonly used version management tool. It allows you to host a remote version of your project, which all partners can use. Any GitHub user, not just members of your team, will add to your code (that is of course if you choose to accept the changes made).

GitHub is a social forum where you can discover open-source software and its source code.
You can work together on incredible projects and share your contributions! This is the most effective open-source framework available.
Additionally, anyone can sign up and host a public code repository for free, which makes GitHub especially popular with open-source projects.

Git vs Github

What’s the difference between Git and GitHub then?

It's equivalent to asking for Email vs. Gmail. Git is a version control system, and GitHub is a cloud-based hosting service that helps in managing Git repositories.
Alt Text

Exploring The GitHub Interface

Alt Text

To give you a basic understanding of what the GitHub interface looks like, here’s the freeCodeCamp source code hosted at a GitHub repository:

From here, you can view the various branches that are being worked on, as well as when someone made a commit (this is kind of like “saving” a file). Depending on how a repository is set up, you also might be able to create your own branch and make your own commits there.

Once you've made the modifications, you can add the code to a branch by making a pull request. A pull request is essentially a request to the branch's maintainer to include your code. It also allows the person to see exactly what changes you've made to the code.

If you were to make permanent changes to any or more of the freeCodeCamp source code on your account, you might fork it by pressing the Fork button (a fork is equivalent to a branch in concept, but a fork is more permanent).

If you want to learn more about Git and GitHub :
Git Documentation
GitHub’s Hello World guide
Git Handbook
MDN Web Docs

Top comments (0)