> ## 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 adopt

> Bring an existing branch under cubic's management

## Name

`mg adopt` — Add a previously untracked Git branch to cubic's stack.

## Synopsis

```bash theme={null}
mg adopt
```

## Description

* If `<branch_name>` was created outside of `mg branch`, adopting it integrates it into your stacked workflow.
* This will open an interactive view of all of your branches that are not tracked in mg, and you can use 'space' to select branches to adopt, and enter to apply.
* After adoption, it appears in `mg list`.

## Examples

```bash theme={null}
# Adopt a local branch named "feature/ui-improvements"
mg adopt feature/ui-improvements
```

<Note>
  * If the parent is unclear, consider [`mg reparent`](/reference/mg-reparent). - If the branch was
    orphaned before, adopting it again is effectively reintroducing it.
</Note>
