Home

Use GitHub Desktop with Claude Code

You’re coding with AI assistance. It makes changes to your files. Sometimes the changes work perfectly. Sometimes they don’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.

When you combine GitHub Desktop with Claude Code, you get AI-speed development with professional version control.

Key Concepts

Git tracks every change to your files on your computer.

GitHub stores your code in the cloud as backup.

GitHub Desktop makes Git visual - you click buttons instead of typing commands.

Claude Code is an AI coding assistant that writes code, fixes bugs, and creates commits for you.

What You’ll Do

Build a simple timer app with Claude Code and track all changes with GitHub Desktop:

What You’ll Need

Step 1: Create Your Project

You now have a local project and cloud backup on GitHub.

Step 2: Ask Claude to Create the Timer App

Claude creates the timer.html file (takes 10-30 seconds).

Step 3: Test the Timer

If it works: Move to Step 5. If something’s broken: Continue to Step 4.

Step 4: Fix Errors (If Needed)

Step 5: Review Changes

Always review AI-generated code before committing.

Step 6: Commit Manually

You’ve created a save point!

Good messages: “Create initial timer app”, “Fix start button” Bad messages: “changes”, “update”, “asdf”

Step 7: Push to GitHub

Your code is now backed up in the cloud.

Step 8: Add Sound Notification

For this tutorial: Pretend the sound doesn’t work well. Don’t commit yet!

Step 9: Discard Bad Changes

Sometimes AI put us on the wrong path and we need to start over from our last commit (save point).

You just threw away broken code and went back to your last save point.

Step 10: Redo from Scratch

If it works: Continue to Step 11. If not: Paste error to Claude or try again.

Step 11: Let Claude Commit and Push

Claude will check changes, write a commit message, commit, and push (10-20 seconds).

When to use:

Step 12: Ask Claude to Summarize Changes

Claude explains your changes in plain English.

Try: explain what the audio code does or show me the last 5 commits

Step 13: View History

You’ll see:

Notice the first failed sound attempt isn’t there - you discarded it! Only working code made it into your commits.

Challenges

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

View your project on GitHub.com: Click RepositoryView on GitHub in GitHub Desktop to see your complete commit history and code online.

Troubleshooting

“Authentication failed”: GitHub Desktop → File/Preferences → Accounts → Sign out and sign in again

Claude says “not a git repository”: Make sure you’re in the right folder (cd ~/Documents/test_claude)

Timer doesn’t work: Open browser console (right-click → InspectConsole), copy errors, paste to Claude

Need help? GitHub Desktop docsClaude Code docs

The Complete Workflow

Manual commits when you want control. Claude commits when you want speed. Discard fearlessly - only commit working code!

Next Steps

Try adding features to your timer:

Quick wins:

Created by Steven Ge on December 7, 2025.