Home

Claude Code with version control for Windows

You’re working with AI assistance. It makes changes to your files. Sometimes the changes are brilliant. Sometimes they aren’t. Version control is like an undo button for your entire project. Every time you save a snapshot (called a “commit”), you create a restore point you can always go back to. Best of all, you can do this entirely on your computer and Claude Code does it for you.

Key Concepts

What You’ll Need

Step 1: Open Ubuntu Terminal

You’ll see a command prompt ending with $.

Step 2: Install Git

You should see something like git version 2.34.1.

Step 3: Configure Git with Your Identity

Git needs to know who you are for commit messages.

Using your name and email helps you identify who made changes when multiple persons work on this.

Step 4: Navigate to a Windows Folder

WSL can access your Windows files through /mnt/c/.

You should see /mnt/c/Users/YOUR_USERNAME/Documents.

Step 5: Create Project Folder

This is where your project will live.

Step 6: Start Claude Code

Claude Code launches and waits for your request.

Step 7: Ask Claude to Initialize Git

Claude initializes a Git repository in your folder (takes 2-5 seconds). You now have version control!

Step 8: Build the Timer App

Claude creates timer.html (takes 10-30 seconds) with the CSS and JavaScript code.

Step 9: Test the Timer

If something’s broken: In Claude Code, describe the error: I'm seeing this error: [describe what happened]. Can you fix it?

Step 10: Ask Claude to Commit

Claude will:

You’ve created your first save point! You can always return to this working version.

Step 11: Add Preset Buttons

We created a 2nd save point. This version has the two buttons working.

Step 12: Add Another Button

For this tutorial: Pretend the 15-minute button doesn’t work correctly. Don’t commit yet—we’ll practice discarding bad changes.

Step 13: Discard Changes

Sometimes AI code doesn’t work and you need to start over from your last save point.

Claude throws away the new changes we don’t like. The timer works again with just the 1- and 5-minute buttons!

Step 14: Add Sound Notification

Step 15: Add snooze button

Step 16: View Your Commit History

Claude displays your commits in a readable format. You’ll see:

Notice the 15-minute button attempt isn’t there—you discarded it!

Step 17: Examine the code

The Complete Workflow

You can always return to any commit. Discard fearlessly—only commit working code!

Next Steps

Try adding more features to your timer:

Remember: Test after each feature, commit after each success, discard failures.

Troubleshooting

What You Can Ask Claude

Claude handles all Git operations through natural language—no commands to memorize!

Workflow Overview

Created by Steven Ge on December 8, 2025.