# What is Github and Why should you use it?

---

## Version Control Basics

Version control is a system that tracks and manages changes to files, especially code, over time, allowing developers to collaborate efficiently, revert to previous versions, and maintain a history of changes.

### Key Concepts

1. Tracking Changes
    
2. Reverting to Previous Versions
    
3. Collaboration
    
4. Repositories
    
5. Commits
    
6. Branching
    
7. Merging
    

Now let us understand what do each of these mean

<details data-node-type="hn-details-summary"><summary>Tracking Changes</summary><div data-type="detailsContent">Version control systems (VCS) record every modification made to a file or set of files, creating a history of changes.</div></details><details data-node-type="hn-details-summary"><summary>Reverting to Previous Versions</summary><div data-type="detailsContent">If a mistake is made, developers can revert to a previous version of the code or file, minimizing disruption and data loss.</div></details><details data-node-type="hn-details-summary"><summary>Collaboration</summary><div data-type="detailsContent">VCS enables multiple developers to work on the same project simultaneously, without interfering with each other's changes.</div></details><details data-node-type="hn-details-summary"><summary>Repositories</summary><div data-type="detailsContent">VCS store the history of changes in a central location called a repository, which can be local or remote.</div></details><details data-node-type="hn-details-summary"><summary>Commits</summary><div data-type="detailsContent">A commit is a snapshot of the changes made to the files at a particular point in time, representing a version of the project.</div></details><details data-node-type="hn-details-summary"><summary>Branching</summary><div data-type="detailsContent">Branching allows developers to create separate lines of development, enabling them to work on new features or bug fixes without affecting the main codebase.</div></details><details data-node-type="hn-details-summary"><summary>Merging</summary><div data-type="detailsContent">Merging combines changes from different branches or versions into a single branch or version.</div></details>

### Benefits of Using Version Control

1. **Improved Collaboration**
    
    Developers can work together on the same project without fear of overwriting each other's work.
    
2. **Enhanced Code Integrity**
    
    VCS helps maintain a clean and organized codebase by tracking changes and allowing for easy rollback.
    
3. **Increased Productivity**
    
    Developers can work faster and more efficiently by leveraging the tools and features of VCS.
    
4. **Easier Bug Fixing**
    
    Developers can easily identify and fix bugs by reverting to previous versions of the code.
    
5. **Better Documentation**
    
    VCS provides a comprehensive history of changes, making it easier to understand the evolution of a project.
    

## Difference between Git and GitHub

The key difference between Git and GitHub is that Git is a free, open source version control tool that developers install locally on their personal computers, while GitHub is a pay-for-use online service built to run Git in the cloud.

Git is a piece of software. GitHub is an online SaaS service. Yet despite this distinction, Git and GitHub are not competitive offerings. Instead, they work together and complement each other.

![](https://www.theserverside.com/rms/onlineimages/serverside-git_vs_github.png align="center")

<div data-node-type="callout">
<div data-node-type="callout-emoji">©</div>
<div data-node-type="callout-text">Credits theserverside</div>
</div>

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">Want to know more? <a target="_self" rel="noopener noreferrer nofollow" href="https://www.theserverside.com/video/Git-vs-GitHub-What-is-the-difference-between-them" style="pointer-events: none">Git vs. Github</a></div>
</div>

## Why developers & companies use GitHub?

Developers and companies use GitHub **for its robust version control (Git), seamless collaboration features, and ability to host and manage code repositories, fostering a collaborative environment for software development and open-source projects.**

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text">Want to know more? <a target="_self" rel="noopener noreferrer nofollow" href="https://docs.github.com/en/get-started/start-your-journey/about-github-and-git" style="pointer-events: none">Git &amp; Github - Github Docs</a></div>
</div>

---
