Git and version control: a thoughtful local history
Create a local repository, select versions with the index, and record coherent commits. Work with branches, integrate a controlled conflict, and practice file recovery without relying on remote services.
- Level
- Beginner
- Lessons
- 5
- Learning steps
- 73
Your lesson journey
Each lesson has a purpose. Follow the order or revisit an idea you want to practise.
5 of 5 lessons shown
The numbers show the lesson order, not your progress.
What you will learn
Initialize and configure an isolated local repository. Distinguish untracked files, modified work, the index, and the committed version. Select content with add and review differences before coherent commits. Consult history and inspect versions with log and show. Apply gitignore without confusing it with removal from history. Create and switch branches and explain references and HEAD in the normal flow. Distinguish fast-forward from divergent integration. Resolve and check a simple conflict or abort a merge when appropriate. Distinguish restore, index restoration, path-based reset, and revert. Recover a test edit with verified scope. Manage a shopping calculator with discounts and taxes and explain its history.
Before you start
Have completed courses 01 through 17 of Programming Fundamentals or know basic JavaScript and terminal use for files and paths. The real workflow requires Git 2.28 or later and your own lab directory outside other repositories. Node.js is optional for checking JavaScript; the content also runs in playgrounds. No external service account is required.
About this course
Read the full description
Five complete lessons with Codi and a local calculator that evolves throughout the course. Includes history diagrams, state examples, activities with hints and feedback, a JavaScript staging model, and real Git practice.
The progression separates the working directory, index, and commits; introduces exclusions, branches, merges, and recovery with explicit effects. The project combines discounts and taxes through a reproducible conflict and retains test cases. Git commands are shared by PowerShell and Bash, while file writes are shown separately.
Exercises are limited to a new lab repository with a fictional local identity. There are no accounts, remote services, or publishing. Git is not presented as a complete backup. Playgrounds run only JavaScript and in-memory models: they do not run Git or access files. Free-form code and reflections are not automatically assessed.
This course is part of these learning paths
Follow the suggested order or take this course on its own.