Version control

Definition
Version control is a system that tracks every change to code over time, so a mistake can always be traced and undone.

Why it matters

The benefit is fearless experimentation. Because any change can be reversed, trying something risky costs almost nothing. This is basic infrastructure even for a one-person project, and it is what other practices assume: branches, pull requests, automated testing and deployment all rely on a history existing. The log also works as documentation. Months later, the trail of commits is often the only record of why something behaves the way it does.

It matters even more when an AI agent writes code. Agents make fast, large changes, and sometimes wrong ones. A history lets a person see exactly what changed and step back to the last good state.

How to apply it

  • Commit small, coherent changes, each with a message that explains why, not only what.
  • Work on a branch for anything beyond a trivial fix, and keep the main line working.
  • Write messages for the person who will read them in six months.
  • Give an AI agent the same rules as a human contributor: its work goes through a branch and a review, never straight onto the main line.
  • Note significant points in the history, such as releases, so a rollback target is easy to find.

What it is

Version control keeps a complete history of a project. Each saved change is called a commit: a snapshot of the files plus a short message saying what changed and why. Instead of one fragile folder that a single bad edit could wreck, the project becomes a timeline that can be searched, compared and rewound. Git is the tool almost everyone uses, and GitHub is a popular place to host the history online.

Worked example

Suppose a one-person product studio asks Claude Code to add a discount field to its invoicing app. The agent makes the change in a few minutes, touching several files. Before anything reaches the live site, the studio works on a branch in GitHub, reads the full change and commits with a message that explains why the discount rule exists. The automated tests run on the branch before the change is merged. Three weeks later a customer reports a rounding error. The history shows the exact commit that introduced it, and the team reverts that one change in a minute rather than searching through the code. Nothing else is lost.

Tools in the example

Some links are affiliate links: we may earn a commission at no cost to you. It never decides a ranking. How we work with partners

  1. Article

    Pull request

    The review step before a change joins the main line.

  2. Article

    CI/CD

    Automated checks that run on every recorded change.

  3. Article

    Rollback

    Returning to an earlier good state.

  4. Article

    Deployment

    Putting a change live.

Where it shows up

  • Writing copy that feels like conversation instead of marketing. How to sound like yourself.
    12 chapters