Understanding Git and GitHub

Aditi KumarAditi Kumar
4 min read

If you have worked with codes then you must have come across the words like Git and GitHub. It is also possible that you might have used them as well. But do you know what exactly is Git or GitHub and how they are different from each other? Well, if you don’t, no worries! It’s never too late to learn new stuff nor is it that tough in this case. In this article on Git vs GitHub, I will be giving you a complete insight into both.

Following are the topics I will be discussing in this Git Vs GitHub article:

  • Version Control

  • What Is Git?

  • What Is GitHub?

  • Git vs GitHub

To understand the exact difference between Git and GitHub you first need to know about version control. So, what do you understand by the term version control?

What is a Version Control System

Essentially, a Version control is a system that allows you to record changes to files over time, thus, enabling the retrieval of specific file versions at a later stage.

A version control system, or VCS, tracks the history of changes as people and teams collaborate on projects together. As the project evolves, teams can run tests, fix bugs, and contribute new code with the confidence that any version can be recovered at any time. Developers can review project history to find out:

  • Which changes were made

  • Who made the changes

  • When were the changes made

  • Why were changes needed

What is git?

Git is a version control system that is maintained on your local system. Git gives us a record of ongoing programming versions. It can be used completely exclusive of any cloud-hosting service i.e. we don’t even need internet to access git.

Let's look at some key concepts in git...

  • Repository (Repo): Think of a repository as a project folder that contains all the files and the entire history of changes.

  • Commit: A commit is a snapshot of your project at a specific point in time. It represents a set of changes you’ve made.

  • Branch: Branches allow you to work on different versions of your project simultaneously. They’re like alternate realities where you can experiment

What Is GitHub?

If you want to add invite others to collaborate on your project and build together. What will you do? Share your computer? No, you have to share your code through some medium and others will make some changes and then they share updated code with you and then you make some changes, and so on… What if there is someplace to host your code and everyone works together? Here comes GitHub into action. GitHub is a cloud-based hosting service that lets us manage Git repositories. It’s an online database that allows you to keep track of and share your Git version control projects outside of your local computer.

You can share code on GitHub with others, enabling them to make changes or modifications on your different Git branches. Entire teams can now collaborate in real-time on a single project thanks to this. New branches are made when changes are made, enabling the team to keep editing the code without erasing each other's contributions.

So, what's the difference between Git and GitHub? Let's take a closer look.

Git vs GitHub:

Git serves as a crucial version control system, enabling developers to monitor and record alterations in their code efficiently. On the other hand, GitHub functions as a web-based hosting service specifically designed for Git repositories. It's essential to recognize that while Git can be utilized independently of GitHub, the reverse is not true – GitHub relies on Git as its underlying version control system.

In simpler terms, Git is like a standalone computer managing code changes, while GitHub acts as a network connecting multiple computers, each playing a distinct role but collectively working towards the common objective of efficient code management, merging, and sharing. This fundamental distinction emphasizes their complementary yet distinct functionalities in the realm of source code management.

Conclusion:

Whether you're a beginner or an experienced coder, consider delving into the realms of Git and GitHub. You could uncover an entirely new dimension to your coding journey! Best of luck with your coding endeavors!

0
Subscribe to my newsletter

Read articles from Aditi Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Aditi Kumar
Aditi Kumar

I am an undergraduate Computer Science student from India. I am familiar with several Technologies like React, Node, MongoDB, SpringBoot, etc. I believe in the power of community therefore I love contributing to open source projects.