---
title: Work with branches
project: Code
version: 2.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/code/2-0/guides/branches/
updated: 2026-11-19T04:32:04.377Z
---

# Work with branches

> Keep separate versions of a project and switch between them.

A branch is a saved copy of the whole project folder. Branches are part of Code and are separate from Git.

The name of the current branch appears under the project name. The main branch is called **master**.

![The Branches window with the Create a new branch link and the master branch](/files/Janvrg29R60f.webp)

## Create a branch

1. Open a file in the project.
2. Click **Branches** next to the editor options.
3. Click **Create a new branch**.
4. Enter a name and press `Enter`.
5. Confirm with **Create branch**.

Code moves you to the new branch.

## Switch to another branch

1. Click **Branches**.
2. Click the branch.
3. Confirm with **Change branch**.

Code stores the files of the current branch and loads the files of the other one.

A file that you add on one branch stays in the folder when you switch. Remove it by hand if you don't want it on the other branch.

## Remove a branch

1. Click **Branches**.
2. Click the trash icon next to the branch.
3. Confirm with **Remove branch**.

You can't remove the branch you are working on.
