# What is a Git branch?

> A Git branch is a separate line of work in a project's code, kept off the live version until it is reviewed. Explained for people reviewing AI changes.

Source: https://learn.ynteractive.com/content/glossary/git-branch · Updated 2026-10-19 · Free from Stepthrough (https://learn.ynteractive.com)

[Web apps](https://learn.ynteractive.com/content/glossary#topic-web-apps) · [AI glossary](https://learn.ynteractive.com/content/glossary)

Quick answer

A Git branch is a separate line of work inside a project's code history. Changes made on a branch stay away from the main version, the one the live site runs, until someone reviews them and merges them in. Think of it as a tracked draft copy.

Last updated October 19, 2026

[Take the free module →](https://learn.ynteractive.com/courses/ai-apps-worth-knowing/21)Module 21 of the free [AI Apps Worth Knowing](https://learn.ynteractive.com/courses/ai-apps-worth-knowing) course, about 15 minutes. No account needed.

Updated October 19, 2026 · By [Robert Breen](https://learn.ynteractive.com/content/about)

## Why it matters for a small business

For an agency or an operations team, the expensive mistake is editing the live site directly. A half-finished change goes out, and undoing it means remembering exactly what was touched. Branches let an AI agent or a developer work on a fee table, a new form and a copy fix at once, each in its own lane, without any of them reaching what customers see.

For non-developers, the useful part is that a branch has a name and a history. You can see which change you are reviewing, which files it touched and every save the agent made along the way. Approve it and the branch is merged. Reject it and the branch is closed, and the live site never knew it existed.

## Branch words you will see in a review

| Word | Plain meaning |
| --- | --- |
| Main or default branch | The version the live site runs |
| Branch | A named draft line of changes |
| Commit | One saved step on a branch |
| Merge | Folding an approved branch into main |
| Pull request | The request to review and merge a branch |

## In a real lesson: Preview Every Website Change Before Your Client Sees It using Kosuke

In [the Kosuke website preview lesson](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees), the **New Session** box shows **Start branch: Project default**. When you click **Start session**, the agent works on its own branch, in its own copy of Calder & Finch's site, so the live website is not touched. The session header shows the branch name, `kosuke/chat-7fq2mx`, next to the model.

Earlier, in **Preferences**, the lesson leaves **Commits** on **Automatic**, so the agent saves its work to that branch after each turn. At the end, **Open PR** turns the branch into pull request #12 on GitHub, and the QA Report carries the same branch name in its title, so every piece of evidence points back to one change.

[Try this lesson free](https://learn.ynteractive.com/modules/kosuke-preview-changes) or [read the step-by-step guide](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees).

## Common confusions

### Git branch vs n8n branches

In n8n, [true and false branches](https://learn.ynteractive.com/content/glossary/true-and-false-branches) are paths in a workflow chosen by a condition. A Git branch is a copy of code history. Same word, unrelated ideas.

### Git branch vs undo history

History or undo in a site builder rolls one project back in time. A branch runs alongside main, so several changes can be in progress at once.

## Tips

- Check the branch name on the review screen so you know which change you are approving.
- Keep one change per branch; it makes review and rollback simple.
- Do not let an agent work straight on main for a client site.

## Related terms

[Pull request (PR)](https://learn.ynteractive.com/content/glossary/pull-request) · [Preview deployment](https://learn.ynteractive.com/content/glossary/preview-deployment) · [Sandbox environment](https://learn.ynteractive.com/content/glossary/sandbox-environment) · [Vibe coding](https://learn.ynteractive.com/content/glossary/vibe-coding) · [Deployment (publishing a web app)](https://learn.ynteractive.com/content/glossary/web-app-deployment)

## More Web apps terms

[HTTP method (GET vs POST)](https://learn.ynteractive.com/content/glossary/http-method) · [HTTP status code](https://learn.ynteractive.com/content/glossary/http-status-code) · [Lovable](https://learn.ynteractive.com/content/glossary/lovable) · [Request body (payload)](https://learn.ynteractive.com/content/glossary/request-body)

## Where you use it: free lessons

- [Preview Every Website Change Before Your Client Sees It using Kosuke](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees) (Kosuke, 15 min)

## AI tools that use it

- [Kosuke](https://learn.ynteractive.com/content/ai-tools/coding-developer#tool-kosuke) ([free lesson](https://learn.ynteractive.com/content/kosuke-preview-website-changes-before-client-sees))

[More terms by tool](https://learn.ynteractive.com/content/glossary/ai-tool-terms)

## Frequently asked questions

**Do I need to know Git to review a branch?**

No. Tools like Kosuke show the branch name, a live preview and test results, and set the agent to explain its work in plain words.

**What happens to a branch after it is merged?**

Its changes become part of main, and the branch can be deleted. The history of what changed stays in the project.

**Can two branches change the same page?**

Yes, and if they change the same lines, Git asks someone to choose which version wins when the second one is merged.

[All AI glossary terms, A to Z](https://learn.ynteractive.com/content/glossary) · [Free prompt templates](https://learn.ynteractive.com/content/prompts)
