What is Git?

TL;DR

Git is a distributed version control system that tracks every change to your code, lets multiple people work in parallel on branches, and makes it safe to experiment — because you can always roll back. Created by Linus Torvalds in 2005, it's the foundation of nearly all modern software development.

The Big Picture

Every developer needs Git. It solves three fundamental problems: tracking changes (who changed what and when), parallel work (multiple people editing the same codebase without overwriting each other), and safe experimentation (try risky changes on a branch, throw them away if they don't work).

Git big picture: working directory, staging area, local repo, and remote repo with arrows showing the flow of git add, commit, push, and pull
Explain Like I'm 12

Imagine you're writing a story in a notebook. Every time you finish a page, you take a photo of it (that's a commit). Now you have a timeline of every version of your story.

Want to try a crazy plot twist without ruining the main story? Photocopy the notebook, experiment on the copy (that's a branch). If the twist works, tape the pages back into the original (that's a merge). If it's terrible, throw the copy away.

Now imagine your friend has their own copy of the notebook too. You both write at the same time, then combine your pages later. That's distributed version control — everyone has the full history, and you sync up when you're ready.

What is Git?

Git is an open-source distributed version control system (DVCS). Unlike older tools (SVN, CVS), every developer has a complete copy of the repository — including its full history. This means you can commit, branch, and search history without any network connection.

Git was created by Linus Torvalds in 2005 to manage the Linux kernel source code. Its design priorities were speed, data integrity, and support for distributed, non-linear workflows — and those priorities made it the dominant VCS worldwide.

Why It Matters

Without GitWith Git
Files named report_final_v2_REAL_final.docxClean history with meaningful commit messages
Email files back and forth to collaboratePush/pull to a shared remote repository
One person edits at a time to avoid conflictsEveryone works in parallel on branches
Experiment by copying the entire folderCreate a branch in milliseconds
"Who broke this?" — nobody knowsgit blame and git bisect find exactly who and when
Accidentally deleted a file? Gone forevergit checkout restores any file from any point in history

Who Is It For?

  • Every software developer — Git is non-negotiable; every team uses it
  • Data scientists & analysts — Version control notebooks, scripts, and SQL queries
  • DevOps engineers — Infrastructure as Code lives in Git repos
  • Technical writers — Docs-as-code workflows use Git for collaboration
  • Students — Learning Git early makes every future project easier

Key Capabilities

  • Commits — Snapshot your project at any point with a message explaining why
  • Branches — Create isolated lines of development in milliseconds
  • Merging — Combine branches back together, Git handles most conflicts automatically
  • Distributed — Full repo on every machine, no single point of failure
  • Staging area — Choose exactly which changes go into each commit
  • History toolslog, blame, bisect, reflog for forensic investigation
  • Rebasing — Rewrite commit history for clean, linear timelines

What You'll Learn

Start Learning: Core Concepts →

Test Yourself

What makes Git "distributed" and why does that matter?

Every developer has a complete copy of the repository and its full history. This means you can commit, branch, and search history offline. There's no single point of failure — if the server dies, every clone is a full backup. It also means operations like log and blame are instant because they don't require network access.

What problem do branches solve?

Branches let you work on features, bug fixes, or experiments in isolation without affecting the main codebase. Multiple people can work on different branches simultaneously. When the work is done, you merge the branch back. If the experiment fails, you delete the branch — no harm done to the main code.

What's the difference between Git and GitHub?

Git is the version control tool that runs locally on your machine. GitHub is a cloud platform that hosts Git repositories and adds collaboration features (pull requests, issues, Actions, code review). Git works without GitHub — you could use GitLab, Bitbucket, or just push to a bare repo on a server. GitHub makes Git-based collaboration easier, but it's not Git itself.

Why was Git created?

Linus Torvalds created Git in 2005 after a licensing dispute with BitKeeper (the previous VCS used for Linux kernel development). He designed Git to be fast, distributed, and capable of handling the Linux kernel's massive codebase with thousands of contributors. The design priorities were speed, data integrity, and support for non-linear development (heavy branching and merging).