Git fundamentals
What Git is
Understand Git as a distributed version control system that stores a complete local project history.
8 minute lesson
Git tracks a project inside a directory we call a repository.
The repository contains two kinds of state. Your visible files are the working tree. Git’s private data lives in the .git directory.
Inside .git, Git stores file contents, directory trees, commits, and references. A branch is one of those references: a readable name that points to a commit.
This is why Git works without a network connection. Your local repository contains its own history. You can inspect commits, create branches, and record new work while offline.
Git is distributed because every normal clone gets a repository, not just a working copy. A server can disappear and your local history still exists.
Git and GitHub are different things. Git is the version control tool. GitHub hosts Git repositories and adds pull requests, issues, permissions, and other collaboration features.
Run this inside any Git project:
git status
The command reads local repository state. It does not contact GitHub.
As a quick exercise, disconnect from the network and run git log --oneline. Your project history is still there.
Lesson completed