Git fundamentals
What Git is
Understand Git as a distributed version control system that stores a complete local project history.
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.
Git works offline
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 is not GitHub
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.
If the command fails with fatal: not a git repository, you are not inside a folder that has been initialized yet. That error comes from your machine, not from the network.
Cloning a repository copies the full history to your machine. That is why git clone takes longer than downloading a zip of the latest files. You get every commit, not just the current snapshot.
As a quick exercise, disconnect from the network and run git log --oneline. Your project history is still there. That is the distributed model in practice.
Lesson completed