Module · 5 lessons

Working with History

Read your project's history, inspect exactly what changed, keep junk out of your repository with .gitignore, and undo mistakes safely.

At a glance

Level
Beginner
Lessons
5 lessons
Time to complete
1 week
Cost
Free forever · no sign-up

Welcome to Working with History, the second module of the course. In Module 1 you learned to create history with commits. Now you’ll learn to use it — which is where Git starts to feel like a superpower rather than a chore. You’ll read your project’s history and find any past change, compare exactly what differs between versions, keep clutter and secrets out of your repository, and undo mistakes without panic.

You’ll get fluent with git log and its many views, inspect changes with git diff, and write a .gitignore so files like logs, caches, and secrets never get committed. Then you’ll learn the commands that make Git forgiving: git restore to discard changes, git commit --amend to fix your last commit, git reset to move history locally, and git revert to safely undo a commit that’s already shared. The module ends with a guided project where you clean up a messy SkyLog repository — fixing a leaked secret, adding ignores, correcting a commit message, and reverting a bad change.

Every command here was run for real, with the output shown exactly as Git produced it. Start with Lesson 1, where you’ll learn to read your project’s history.

Lessons in this module

Achievement

Complete all 5 lessons to finish the Working with History module.

Start module