Pathmaker
Version Control with Git
A practical class on using Git to track changes, collaborate, recover from mistakes, and manage projects like a professional—from first commit to branching strategies.
About This Course
Git is the version control system used by virtually every professional software project. This class teaches students not just the commands but the mental model: what a repository is, why branching matters, how to collaborate without overwriting each other's work, and how to recover from mistakes.
No prior coding experience required—Git works on any kind of text file.
What You'll Learn
- 1Initialize a repository and make commits with clear messages
- 2Use branches to work on features without affecting the main codebase
- 3Merge branches and resolve simple merge conflicts
- 4Push and pull from a remote repository on GitHub
- 5Use git log and git diff to understand a project's history
- 6Recover from common mistakes using reset and revert
Week by Week
What Is Version Control and Why Does It Matter?
Version control is a system for tracking changes to files over time—so you can see what changed, when, and why. It also enables collaboration without overwriting each other's work.
This week builds the mental model before touching any commands.
Explore this week's curriculum
Key concepts
Version Control: A system that records changes to files over time, allowing you to recall specific versions, compare changes, and collaborate safely.
Repository (Repo): A directory tracked by Git. Contains the project files and the full history of every change made to them.
Commit: A snapshot of the project at a specific point in time. Each commit has a message, author, timestamp, and unique ID.
Git vs GitHub: Git is the version control tool that runs locally. GitHub is a cloud platform for hosting Git repositories and collaborating.
Studio activities
First Repository
Initialize your first Git repository and make your first three commits on a plain text project (not code).
- Create a new folder called 'my-first-repo'
- Open a terminal in that folder and run 'git init'
- Create a file called notes.txt and write a few sentences
- Run 'git add notes.txt' and then 'git commit -m "First commit: add notes"'
- Edit notes.txt and add more content
- Stage and commit with a descriptive message
- Repeat once more with another meaningful change
- Run 'git log' to see your three commits
Success criteria
A Git repository with at least three commits, each with a descriptive message, visible in 'git log' output
Reflection
- What would be different about your project files if you hadn't used Git?
- What makes a commit message useful versus useless?
Study guidance
- Think of commits like save points in a video game—you can always return to a previous save
- Install Git and verify it works with 'git --version' before starting exercises
Discuss with Professor Reed
Choose a question to discuss with Professor Reed. Copy it and paste it into your conversation with him. The copied text includes this week's lesson and assignment; add your own questions or explain where you are stuck.
What problem does version control solve that manually saving copies of files doesn't?
Why is it important that every commit has a message?
What is the difference between Git and GitHub?
What would be different about your project files if you hadn't used Git?
What makes a commit message useful versus useless?
Ask me one question at a time to check my understanding, then explain any gaps.
Help me plan this assignment without doing the work for me.
Staging, Diffing, and the Git Workflow
Git has a specific workflow: you make changes, stage the ones you want to include, then commit. Understanding the staging area—and how to inspect what's changed with git diff—gives you precision control over your project history.
Explore this week's curriculum
Key concepts
Working Directory: Where you make changes to files. Git tracks what's different from the last commit.
Staging Area (Index): A holding area where you place changes before committing. Lets you commit some changes but not others.
git diff: Shows the differences between the working directory, staging area, and last commit. Essential for reviewing before committing.
git status: Shows which files have been changed, staged, or are untracked. Run this constantly.
Studio activities
Selective Staging
Make multiple changes to different files and practice staging them selectively—committing only some changes while leaving others unstaged.
- Make changes to at least two different files in your repository
- Run 'git status' and observe which files are shown as modified
- Run 'git diff' and read what changed in each file
- Stage only one file using 'git add filename'
- Run 'git status' again—notice the staged vs unstaged distinction
- Commit only the staged file with a specific message
- Stage and commit the second file separately
- Run 'git log' to see the two distinct commits
Success criteria
Two separate commits, each containing changes to only one file, with distinct and descriptive commit messages
Reflection
- Why would you want to commit changes to different files separately?
- What information does git status give you that you couldn't get just by looking at your files?
Study guidance
- Run 'git status' before and after every command until the workflow becomes automatic
- Stage changes selectively with 'git add -p' to add only specific parts of a file
Discuss with Professor Reed
Choose a question to discuss with Professor Reed. Copy it and paste it into your conversation with him. The copied text includes this week's lesson and assignment; add your own questions or explain where you are stuck.
Why does Git have a staging area instead of just committing everything that changed?
How would you use git diff to review your work before committing?
What would a good commit look like—and what would a bad one look like?
Why would you want to commit changes to different files separately?
What information does git status give you that you couldn't get just by looking at your files?
Ask me one question at a time to check my understanding, then explain any gaps.
Help me plan this assignment without doing the work for me.
Branching and Merging
Branches let you work on a new feature or idea without touching the main, stable version of your project. This week teaches students to create branches, switch between them, and merge changes back—including handling a basic merge conflict.
Explore this week's curriculum
Key concepts
Branch: A parallel line of development. Changes on a branch don't affect other branches until merged.
main / master: The default branch, typically representing the stable, production-ready state of a project.
Merge: Combining the changes from one branch into another. Git tries to do this automatically; conflicts require manual resolution.
Merge Conflict: When two branches have changed the same part of the same file in incompatible ways. Must be resolved manually before merging.
Studio activities
Branch, Develop, and Merge
Create a new branch, make commits on it, then merge it back to main. Intentionally create a merge conflict and resolve it.
- On main, create a file with a few lines of content and commit it
- Create a new branch: 'git checkout -b feature-branch'
- Edit one line of the file and commit on the feature branch
- Switch back to main: 'git checkout main'
- Edit the same line differently on main and commit
- Merge feature-branch into main: 'git merge feature-branch'
- Observe the merge conflict markers in the file
- Edit the file to resolve the conflict, remove the markers, and commit the merge
Success criteria
A completed merge with a documented merge conflict that was resolved manually, resulting in a clean final state on main
Reflection
- What would have happened if you had made both sets of changes directly on main instead of using a branch?
- How does resolving a merge conflict feel different from making a regular commit?
Study guidance
- Always know which branch you're on: 'git branch' shows all branches, with * marking the current one
- Create a new branch before starting any new feature—never develop directly on main
Discuss with Professor Reed
Choose a question to discuss with Professor Reed. Copy it and paste it into your conversation with him. The copied text includes this week's lesson and assignment; add your own questions or explain where you are stuck.
Why would you want to keep a stable 'main' branch and develop on separate branches?
What does Git do when it encounters a merge conflict, and what does the conflict look like in a file?
How would you use branches to work on two features simultaneously?
What would have happened if you had made both sets of changes directly on main instead of using a branch?
How does resolving a merge conflict feel different from making a regular commit?
Ask me one question at a time to check my understanding, then explain any gaps.
Help me plan this assignment without doing the work for me.
Remote Repositories and GitHub
A local Git repository is powerful alone, but the real value comes from connecting it to a remote—backing up your work, sharing it, and collaborating with others. This week students connect their local repository to GitHub and practice pushing, pulling, and opening a pull request.
Explore this week's curriculum
Key concepts
Remote: A version of your repository hosted on a server (like GitHub). Usually named 'origin'.
Push: Uploading your local commits to the remote repository.
Pull: Downloading and integrating changes from the remote repository into your local branch.
Pull Request (PR): A GitHub feature for proposing that changes from one branch be merged into another. The standard collaboration mechanism.
Studio activities
Push to GitHub
Connect your local repository to a new GitHub repository and push your commit history. Then make a new branch and open a pull request.
- Create a new repository on GitHub (leave it empty, no README)
- In your local repo, add the remote: 'git remote add origin [url]'
- Push main to GitHub: 'git push -u origin main'
- Verify your commits appear on GitHub
- Create a new branch locally, make a commit, and push it
- On GitHub, open a pull request from your branch to main
- Review the diff in the PR and then merge it
Success criteria
A GitHub repository with pushed commit history, a merged pull request visible in the PR history
Reflection
- How does a pull request improve collaboration compared to just merging locally?
- What would a well-described pull request include beyond just the code changes?
Study guidance
- Create a GitHub account before this week and configure SSH keys or a personal access token for authentication
- Think of push/pull like syncing: push sends your work up, pull brings others' work down
Discuss with Professor Reed
Choose a question to discuss with Professor Reed. Copy it and paste it into your conversation with him. The copied text includes this week's lesson and assignment; add your own questions or explain where you are stuck.
Why would you push to a remote even if you're working alone?
What is the purpose of a pull request beyond just merging code?
What would happen if two people pushed to the same branch without pulling first?
How does a pull request improve collaboration compared to just merging locally?
What would a well-described pull request include beyond just the code changes?
Ask me one question at a time to check my understanding, then explain any gaps.
Help me plan this assignment without doing the work for me.
Recovering from Mistakes
Git's greatest underappreciated feature is undo. Every commit is recoverable, every mistake reversible—if you know the right commands.
This week teaches students the safe ways to undo changes, revert commits, and restore files, turning Git's history from a record into a safety net.
Explore this week's curriculum
Key concepts
git restore: Discards changes in the working directory, returning a file to its last committed state.
git revert: Creates a new commit that undoes a previous commit. Safe to use because it preserves history.
git reset: Moves the branch pointer backward. --soft keeps changes staged; --hard discards them. Rewrite history with caution.
git stash: Temporarily saves uncommitted changes so you can switch context without committing or losing work.
Studio activities
Undo Drills
Deliberately make and then undo several types of mistakes using different Git recovery tools. Document what each command did.
- Make an unwanted change to a file and recover it with 'git restore'
- Make a commit you regret and undo it safely with 'git revert'
- Use 'git stash' to save uncommitted work, switch branches, then restore it with 'git stash pop'
- Use 'git log' and 'git diff HEAD~1 HEAD' to inspect what changed in the last commit
- For each operation, document what command you used and what it produced
- Write a short guide titled 'What to do when you mess up in Git'
Success criteria
All four recovery operations completed and documented, plus a written guide to Git recovery that would be useful to a classmate
Reflection
- How has learning to undo mistakes changed how confident you feel making changes?
- What is one Git workflow habit you want to build from this class?
Study guidance
- Prefer git revert over git reset on shared branches—reset rewrites history and causes problems for collaborators
- git stash is your escape hatch when you're mid-work and need to switch branches quickly
Discuss with Professor Reed
Choose a question to discuss with Professor Reed. Copy it and paste it into your conversation with him. The copied text includes this week's lesson and assignment; add your own questions or explain where you are stuck.
When would you use git revert instead of git reset, and why?
What is the danger of using 'git reset --hard'?
How does git stash let you context-switch without losing work?
How has learning to undo mistakes changed how confident you feel making changes?
What is one Git workflow habit you want to build from this class?
Ask me one question at a time to check my understanding, then explain any gaps.
Help me plan this assignment without doing the work for me.
Topics Covered
More in This Track
Designing for Delegated Experiences
Design how people entrust decisions and actions to people, services, and agents.
Algorithms and the Online Experience
Investigate how ranking, recommendation, advertising, and moderation mediate everyday online life.
Design, Technology, and AI Systems
How designers can understand AI products, software ecosystems, automation, interfaces, and workflow tools — without becoming purely technical.
Ready to begin?
Start your personalized curriculum today — free to try, no credit card needed.