> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cubic.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mg checkout

> Switch to another branch tracked by cubic

## Name

`mg checkout` — Switch your working directory to a different branch in the stack.

## Synopsis

```bash theme={null}
mg checkout <branch_name>
```

## Description

* Changes your current working branch to `<branch_name>`.
* If `<branch_name>` isn't tracked by cubic, it will prompt you to adopt it or use normal git.

## Examples

```bash theme={null}
mg checkout feature_2
```

<Note>
  * This is a thin wrapper around `git checkout` but ensures cubic tracking remains consistent. - If
    you see a "branch not tracked" error, consider [mg adopt](/reference/mg-adopt).
</Note>
