YCYou Can Build Anything

Skills and workflow

How to use Git when you don't really know Git

4 min read

Git is version control, which is a fancy phrase for "infinite undo plus a running record of every change you make." That is most of what you need to know to use it well, which is convenient, because the people who do understand the rest of Git mostly understand it in the sense that they have learned to avoid the dangerous corners. You can do the same.

What it's actually for

When you build software, you make changes. Some of those changes are good. Some are mistakes. Some looked like a good idea at 11pm and look like the work of a stranger by morning. Git is what lets you go back. It records a snapshot of your project every time you tell it to, with a short note describing what changed, and from then on you can return to any of those snapshots.

It also backs your work up, once you connect it to GitHub. GitHub is a website where Git's snapshots live in the cloud, so your project is safe if your laptop dies and shareable if you want someone else to see it. Most AI coding tools assume you'll use both, and they set this up for you in a few steps.

The five verbs you'll see

Five commands cover almost everything you'll meet, and you only need to recognize them, because your AI will usually run them on your behalf.

clone copies a project from GitHub down to your machine. You'll use this when you start working on something that already exists somewhere else.

add marks which changes you want to save. Most AI coding tools do this for you.

commit records those changes as a checkpoint with a short note. This is the snapshot. Each commit is a save point you can return to, and it's where the AI coding loop lands when work reaches a good state.

push sends your saved checkpoints up to GitHub. This is the backup.

pull brings down changes that exist on GitHub but not yet on your computer. You'll use this if you ever work on the same project from two machines.

That's the whole vocabulary you need. Five verbs, and you've met all of them.

How AI coding tools handle Git

In practice, you'll rarely type Git commands directly. You'll say things like "commit this with a note about the new contact form" to your AI, and it will run the actual commands. You'll see them happen, and over a few weeks you'll start to recognize them. There's no rush to learn the syntax. The pattern absorbs by exposure.

The one place worth paying attention is the commit message. The note you attach to each snapshot is the thing future-you uses to figure out what you did. Ask your AI to write descriptive messages. "Update site" is useless. "Add testimonials section to the homepage and change the header to sage green" is the kind of note that's still useful six months from now.

The one rule worth following

Commit often. The mistake new users make with Git is treating it like a finish line, something you do when the work is done. It's the opposite. You commit when something is in a good state, which might be several times an hour. Each commit is a place you can come back to. The more of them you have, the more freely you can experiment, because the safety net is closer behind you.

That's most of what makes someone confident in Git. Not knowledge of the obscure commands. The habit of saving small, frequent checkpoints with clear notes. Build that habit, and the rest of Git, the few commands you'll meet down the road, your AI will handle when they come up.

The steps, in order

Lean on the five Git commands an AI coding tool will run for you, and the one habit that makes the rest of Git easy.

  1. Recognize the five commands

    Memorize the names: clone, add, commit, push, pull. Your AI runs most of them for you.

  2. Set up GitHub

    Create a GitHub account and let your AI guide you through connecting it with an SSH key.

  3. Let the AI commit for you

    Ask your AI to commit whenever a piece of work is in a good state. Each commit is a save point.

  4. Ask for descriptive messages

    Tell your AI to write commit messages that describe what changed, not just "update site".

  5. Commit often

    Save several checkpoints per hour during active work so the safety net stays close behind you.

  6. Push to GitHub

    When you want a backup or want to share, ask your AI to push your commits up to GitHub.

Frequently asked questions

What's the difference between Git and GitHub?

Git is the version-control software that runs on your computer and records snapshots of your project. GitHub is a website where those snapshots can live in the cloud, backed up and shareable. You use both together, but they're separate tools.

Do I need to learn Git to use AI coding tools?

No. Recognize the five commands (clone, add, commit, push, pull) and let your AI run them. The habit that matters is committing often with clear notes, not memorizing syntax.

How often should I commit changes?

Often. Every time the project is in a good state, even several times an hour. Each commit is a place you can return to, and the more of them you have, the more freely you can experiment with the next change.

Hand-picked next steps from the same thread of thinking.

Browse every article →