Sitemap
Vandadi Siva Prasad

Vandadi Siva Prasad

GitHub

3 min readMar 3, 2026

--

Git

Git is a Distributed verson control system (DVCS). It is created by Linus Torvalds.

why we need to use git ?
Git tracks the history of all changes made to the code.
It allows teams to work together efficiently and improves collaboration.
Using Git, we can undo mistakes and manage different versions of the code easily.

Version Control

means managing and saving multiple versions of code over time. It helps track who made changes, what changes were made, and when they were made. Git tracks these changes, allows comparison between different versions, and enables reverting to older versions if needed.

We use the Git tool on our local system by installing it. Git does not require an internet connection to track changes because it works offline. However, an internet connection is required when pushing code to remote repositories like GitHub.

GitHub

Github is a cloud-based platform used to store, manage, and collaborate on code using Git.

GitHub is a website where developers save their code and work together on projects.

Why we need to use GitHub ?
GiHub is used to store source code online. It tracks code changes by maintaining version history. GitHub enables team collaboration, allowing multiple developers to work on the same project efficiently. It supports code reviews through pull requests and helps automate builds and deployments using CI/CD workflows. Additionally, GitHub allows developers to contribute to open-source projects.

Important Terms

  • 📁 Repository (Repo) → Project folder stored on GitHub
  • 📌 Commit → Snapshot of changes
  • 🌿 Branch → Separate working version of code
  • 🔁 Pull Request (PR) → Request to merge changes
  • 🍴 Fork → Copy of someone else’s project

Common Git Commands
git status
git log
git diff
git branch
git checkout
git pull
git clone

🌿 Branch in GitHub
A branch is an independent line of development within a repository. It allows you to work on new features or bug fixes without affecting the main codebase.

Branching is especially useful in production environments. When making changes to the code, we can create a new branch to safely develop and test updates without impacting the production code.

If we make changes directly to the main branch in production, it may introduce bugs or issues that can affect the live application.

Get Vandadi Siva Prasad’s stories in your inbox

Join Medium for free to get updates from this writer.

git branch # list branches
git branch new-branch # create branch
git checkout branch-name # switch branch
git checkout -b new-branch # create + switch
git merge branch-name # merge branch
git branch -d branch-name # delete branch

🔹 Real-World Development Workflow

Here’s how teams typically use Git and GitHub:

  1. Developer creates a new branch.
  2. Makes changes and commits code.
  3. Pushes the branch to GitHub.
  4. Creates a Pull Request.
  5. Team reviews the code.
  6. After approval, it is merged into the main branch.
  7. CI/CD pipeline deploys the application.

This workflow ensures:

  • Code quality
  • Team collaboration
  • Safe deployments
  • Faster development cycles

🎯 Conclusion

Git and GitHub are essential tools in modern software development.

  • Git helps track and manage code changes locally.
  • GitHub provides a cloud platform for collaboration and automation.
  • Branching ensures safe and organized development.
  • Version control helps maintain project history and stability.

Together, they form the foundation of DevOps and modern application development.

--

--