> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/code/managing-branches/creating-a-branch.md).

# Creating a Branch

Create a new branch from an existing source branch to manage isolated development work.

## ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) Overview <a href="#overview" id="overview"></a>

Branches in DevOps allow developers to isolate changes, test new features, and deploy safely. You can create a new branch from an existing source, like main or another feature branch. This article explains how to create a new branch.

{% hint style="info" %}

### Benefits of Creating Branches

Creating branches in your development process has several advantages:

* **Isolated changes:** All commits and changes can be made in isolation, without impacting other branches.
* **Merge flexibility:** Branches can be integrated into other branches through pull requests.
* **Feature development:** Develop new features without disturbing the main development line.
* **Hotfix preparation:** Create dedicated branches for urgent production fixes.
* **Release stabilization:** Use release branches for testing and stabilizing code before deployment.
  {% endhint %}

## Creating a New Branch

{% stepper %}
{% step %}

### Name Branch

1. Click **Branches** from the left sidebar menu.
2. Click **Create Branch**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F25KCFh4LpcqkO5TszE2k%2FCreatingABranch-S01-01.png?alt=media&amp;token=57550e7c-1041-46b5-a02b-bdc1a8df1a13" alt="" width="563"><figcaption></figcaption></figure></div>
3. In the **New branch name** textbox, enter a descriptive name for the branch.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FRmLhcKhFXvS3hWsPTUTd%2FCreatingABranch-S01-02.png?alt=media&amp;token=a2c2e363-9125-44b6-b7ef-85ccac322649" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Choose Source

By default, most new branches are created from **main** since it’s synced with Production. However, you can select the source based on where you want to start your new branch, ensuring it begins with the right context for your work.

<table><thead><tr><th width="100.33331298828125">Branch</th><th>Use When</th></tr></thead><tbody><tr><td>Main</td><td>Starting fresh work aligned with Production.</td></tr><tr><td>Release</td><td>Your work should include all changes already merged and staged for release.</td></tr><tr><td>Feature</td><td>Collaborating with another developer, so your branch inherits their ongoing changes instead of starting clean.</td></tr></tbody></table>

1. Click the **Source branch** dropdown menu.
2. Search or browse for the desired source branch.
3. Select a source branch to branch off from (commonly the **main** branch).

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FYuNixTUuGUD1xqcMG8hW%2FCreatingABranch-S02-01.png?alt=media&amp;token=8932ddf5-f806-4c1a-a459-2414ff7b4458" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Jira Integration

If your DevOps is integrated with **Jira**, you can select:

* **Integration** - The Jira account to use.
* **Project** - Link to a specific Jira project.
* **Stories** - Attach user stories from Jira to the branch.

  <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FkOQM51Lz0GKJXCkZMkuT%2FCreatingABranch-S03-01.png?alt=media&amp;token=8b7b53ba-6102-4947-b9bb-45669468fd1a" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
For complete instructions on creating a branch integrated with Jira, see the following article.

* \[Coming Soon] Creating a Branch with Jira Integration
  {% endhint %}
  {% endstep %}

{% step %}

### Create a New Branch

1. Click **Create branch**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FD3K9OYZCI3w9J7EXYonL%2FCreatingABranch-S04-01.png?alt=media&amp;token=a2621ac0-a159-4640-8f1c-80bf0b6352c5" alt="" width="563"><figcaption></figcaption></figure></div>
2. After the branch is created, you will be taken to the branch's **Components** tab.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FXfncbhK5iUVtcFGG2WZE%2FCreatingABranch-S04-02.png?alt=media&amp;token=3b5b10bb-17df-4fbe-9e7d-0b7e3fe4bedc" alt="" width="563"><figcaption></figcaption></figure></div>
3. The new branch is listed on the **Branches** page.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2Fy2Aec4Aq1V5b4p6ZA9H4%2FCreatingABranch-S04-03.png?alt=media&amp;token=ab1dbd2a-f3e5-4a5f-bb89-ade0051f5923" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/code/managing-branches/creating-a-branch.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
