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

# Branching

**Branching** allows you to fork your conversation from any point and continue in a new direction. Start a new task from the current context without losing your original thread.

<Frame caption="Branching Overview">
  <iframe src="https://www.youtube.com/embed/bOHrHXQJieU?si=GumUP4aP3yJoyiOt" title="Branching Overview" className="w-full aspect-video rounded-xl" />
</Frame>

***

## How Branching Works

When you branch a conversation, Compyle creates a **new task** that starts from your selected point. This lets you explore different approaches, test alternatives, or continue work in parallel — all while preserving the original conversation.

<Callout icon="code-branch" iconType="duotone" color="#3CB878">
  <strong>Explore Without Limits</strong><br />
  Branch your conversation to try different solutions or strategies without affecting the original task flow.
</Callout>

***

## Before You Branch

To avoid losing any generated code, make sure to:

1. **Commit and push** your changes from the current task.
2. Or, **create a Pull Request** to preserve your work.

<Callout icon="triangle-exclamation" iconType="duotone" color="#E28F2A">
  <strong>Important</strong><br />
  Code generated in a task is tied to that task. Always save your work before branching to ensure nothing is lost.
</Callout>

***

## Creating a Branch

To branch your conversation:

1. Navigate to the point in the conversation where you want to branch.
2. Select the **Branch** option.
3. A new task will be created, starting from that context.

You can now continue the conversation in a new direction while the original task remains unchanged.
