# Version Control with Git: A Technical Overview

Git is an open-source **version control system**.

***What is Version Control System?***

Version Control System(VCS) is a tool that helps to track changes to files whenever we make changes in our code.

Git is a specific type of version control system.

## Why use Git?

* **Open-source and free:** Git is free as it is being maintained by the open-source community.
    
* **History tracking:** Git helps track changes to files and saves the earlier versions of changes in the source code.
    
* **Collaboration:** It helps developers collaborate and write code without replacing their own changes in the source code.
    
* **Keeping backup:** Git keeps a backup of every change, in case the code is lost.
    

## How to use Git

* **Repository(repo):** Git project folder containing code and every change.
    
* **Commit:** A specific message of changes.
    
* **Branch:** An independent line of development based on a commit.
    
* **Merge:** Integrates changes from different branches
    
* **Clone:** Copy of the source repository taken from a remote server to the local machine.
    
* **Fetch:** Download changes from a remote server but does not make changes in local branch.
    
* **Push:** Upload local commits to a remote server(e.g., GitHub).
    
* **Pull:** Download changes from a remote server and merge those changes to the local branch.
    

## Basic Git Commands

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1753197181490/b101478f-dddc-4f74-80f9-c721a11718b1.png align="center")

## Real World example

Suppose a team of developers is making a new version of a website.

* Each developer clones the main source code onto their own machine from GitHub.
    
* One works on **frontend(UI)**, another on **backend**, and another on **database**.
    
* They create branches, make changes, commit changes and push them in GitHub.
    
* After reviewing the changes, the commits get merged.
    
* The final version gets pushed to GitHub.
    

## Difference : Git vs GitHub

Many people confuse Git with GitHub.

* **Git** is the tool for version control that runs on local machine.
    
* **GitHub** is the platform to store and share Git repositories online, which works with the help of a cloud server.
    

Git gives structure to the workflow, protects the progress, and simplifies teamwork. Git has made it easy for developers to write code and collaborate without conflict — making development much faster and more efficient.
