Skip to main content

Command Palette

Search for a command to run...

What is Github and Why should you use it?

Published
3 min read
R
Hi 👋, I'm Ritaban Ghosh A college student who is passionate about Programming. I love working with JavaScript, Vite.js, Python, and MongoDB also deploying projects on Cloudflare Pages, Vercel, or Render. Let's gain knowledge and share 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

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

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.

©
Credits theserverside
💡
Want to know more? Git vs. Github

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.

💡
Want to know more? Git & Github - Github Docs

Mastering GitHub from Scratch

Part 1 of 1

A beginner-friendly guide covering everything from setting up GitHub to advanced workflows