Git & GitHub: Module 3

Module 3

Git: repositories, commits & branches

Git is a distributed version control system: every clone of a project is a full copy of history — you can work offline, commit locally, and later push to share. That’s different from old “single central server” systems where you needed a connection to save a checkpoint.

Repository (“repo”)

A repository is a folder Git is tracking, plus a hidden .git directory that stores the object database (commits, trees, blobs). “Init a repo” = turn a folder into a project Git can version.

Commit

A commit is an immutable snapshot of the project at a point in time, with an author, timestamp, and message. Commits link to their parent commit(s), forming a directed graph — history you can walk backward or merge across branches.

Branches & merge

A branch is a movable pointer to a commit — usually main or master for the primary line. You create a branch to try features; when ready, you merge back (or open a pull request on GitHub — next module).

You don’t need to memorize the CLI yet. Apps and sites (including GitHub’s web UI) can create and merge branches for you. Understanding the words helps you read any tutorial.