Git and GitHub From Scratch
Track every change in your projects with confidence and collaborate on GitHub without fear of losing work.
This course is for members
$9 unlocks every course in the library, this one included, plus a credit to build a topic of your own and at least 10 new courses every month.
What you will learn about Git and GitHub From Scratch
The 7-day sprint
- Your First Repository and First Commit. A Git repository is an ordinary folder plus a hidden
.gitdirectory that stores the complete history of that folder. - The Staging Area and How Git Sees Changes. Every file lives in one of three places: the working tree you edit, the staging area you build a commit in, and the repository where commits are stored forever.
- Reading History and Undoing Mistakes. Git gives you a different undo command for each stage of the pipeline, and choosing the right one depends on whether the change is unstaged, staged, or already committed.
- Branches Are Just Movable Pointers. A branch is a lightweight, movable pointer to one commit, and
HEADis the pointer that says which branch you are currently on. - Merging and Resolving Conflicts. Merging combines two branches by comparing both to their common ancestor, and a conflict happens only when both branches changed the same lines of the same file.
- Remotes, GitHub, and Pushing Your Work. A remote is a nickname for another copy of your repository, and pushing and pulling are just ways of syncing commits between your copy and that one.
- GitHub Flow and Pull Requests. The standard way teams work is GitHub flow: branch off
main, push the branch, open a pull request, get it reviewed, merge, and delete the branch.
The 80/20: the 7 concepts that matter most
- The three areas and the add-then-commit rhythm
- A commit is an immutable snapshot with a parent
- Branches and HEAD are pointers, not copies
- Merging uses the common ancestor, so conflicts are narrow
- Remotes: clone, fetch, pull, push
- GitHub flow: short branch, pull request, review, merge
- The undo toolkit and the rule about shared history
The core idea, explained like you are 5
A commit is a complete snapshot of your project at one moment, permanently linked to the snapshot that came before it, and everything else in Git and GitHub is built on that chain of snapshots.
Then the quiz and the ladder
10 questions that correct you when you are wrong, and beginner, intermediate, advanced levels, each with a practical exercise.
Created Sep 12, 2026. No mistakes have been reported by learners.
Written from these sources
- 2.1 Git Basics - Getting a Git Repository, git-scm.com. days 1 and 2 on init, staging, and commits.
- 1.3 Getting Started - What is Git?, git-scm.com. three file states used in day 2 and pareto.
- Git - gittutorial Documentation, git-scm.com. object database and index framing in eli5.
- Git - user-manual Documentation, git-scm.com. remotes, fetch, and fast-forward in day 6.
- 1.5 Getting Started - Installing Git, git-scm.com. day 1 install and setup guidance.
- Hello World - GitHub Docs, docs.github.com. day 7 pull request steps and vocabulary.
- GitHub flow - GitHub Docs, docs.github.com. day 7 and the GitHub flow pareto concept.
- Pull requests - GitHub Docs, docs.github.com. pull request tabs, forks, review model in day 7.
- About authentication to GitHub - GitHub Docs, docs.github.com. day 6 HTTPS versus SSH authentication.
- Managing your personal access tokens - GitHub Docs, docs.github.com. day 6 personal access token as password.
- git 2 23 switch restore, infoq.com. day 3 and day 4 switch and restore history.
- Git - git-reset Documentation, git-scm.com. reset modes in the advanced undo lesson and quiz.
- Git - git-revert Documentation, git-scm.com. revert as an inverse commit, shared branch question.
- Git - git-restore Documentation, git-scm.com. restore and restore --staged in beginner and advanced lessons.
- Merging vs. Rebasing | Atlassian Git Tutorial, atlassian.com. rebase rewriting commits, interactive rebase squash.
- Resetting, Checking Out & Reverting | Atlassian Git Tutorial, atlassian.com. reset versus revert on shared history.
- Creating a pull request from a fork - GitHub Docs, docs.github.com. fork workflow, base and compare branches.
- Approving workflow runs from forks - GitHub Docs, docs.github.com. maintainer approval of fork workflow runs.
- GitHub - susam/gitpr: Quick reference guide on fork and pull request workflow ยท GitHub, github.com. branch as pointer, upstream remote naming.