> 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/devops-ja/kdo/buranchino-1/buranchino.md).

# ブランチの作成

既存のソースブランチから新しいブランチを作成し、分離された開発作業を管理します。

## ![](https://225042527-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) 概要 <a href="#overview" id="overview"></a>

DevOps のブランチを使うと、開発者は変更を分離し、新しい機能をテストし、安全にデプロイできます。main や別のフィーチャーブランチなど、既存のソースから新しいブランチを作成できます。この記事では、新しいブランチを作成する方法を説明します。

{% hint style="info" %}

### ブランチを作成するメリット

開発プロセスでブランチを作成すると、いくつかの利点があります:

* **変更の分離:** すべてのコミットと変更を、他のブランチに影響を与えることなく、独立して行えます。
* **マージの柔軟性:** プルリクエストを通じて、ブランチを他のブランチに統合できます。
* **機能開発:** メインの開発ラインを妨げずに、新しい機能を開発できます。
* **ホットフィックスの準備:** 緊急の本番修正用に専用のブランチを作成します。
* **リリースの安定化:** デプロイ前のテストとコードの安定化には、リリースブランチを使用します。
  {% endhint %}

## 新しいブランチを作成する

{% stepper %}
{% step %}

### ブランチ名

1. クリック **ブランチ** を左側のサイドバーメニューから。
2. クリック **ブランチを作成**.

   <div align="left"><figure><img src="https://225042527-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. で **新しいブランチ名** テキストボックスに、ブランチの説明的な名前を入力します。

   <div align="left"><figure><img src="https://225042527-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 %}

### ソースを選択

デフォルトでは、ほとんどの新しいブランチは **main** から作成されます。これは Production と同期しているためです。ただし、新しいブランチをどこから開始したいかに応じてソースを選択でき、作業に適したコンテキストで始められます。

<table><thead><tr><th width="100.33331298828125">ブランチ</th><th>使用する場合</th></tr></thead><tbody><tr><td>Main</td><td>Production に合わせた新しい作業を始める場合。</td></tr><tr><td>リリース</td><td>作業には、すでにマージされ、リリース用にステージングされたすべての変更を含める必要があります。</td></tr><tr><td>フィーチャー</td><td>別の開発者と共同作業する場合。そうすると、ブランチは最初から作成するのではなく、その開発者の進行中の変更を引き継ぎます。</td></tr></tbody></table>

1. 次を **ソースブランチ** ドロップダウンメニューをクリックします。
2. 必要なソースブランチを検索または参照します。
3. 分岐元として使うソースブランチを選択します（通常は **main** ブランチ）。

   <div align="left"><figure><img src="https://225042527-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 連携

DevOps が **Jira**と連携している場合は、次を選択できます:

* **連携** - 使用する Jira アカウント。
* **プロジェクト** - 特定の Jira プロジェクトにリンクします。
* **ストーリー** - Jira のユーザーストーリーをブランチに添付します。

  <div align="left"><figure><img src="https://225042527-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" %}
Jira と連携したブランチの作成手順の詳細は、次の記事を参照してください。

* \[近日公開] Jira 連携でブランチを作成する
  {% endhint %}
  {% endstep %}

{% step %}

### 新しいブランチを作成

1. クリック **ブランチを作成**.

   <div align="left"><figure><img src="https://225042527-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. ブランチが作成されると、そのブランチの **コンポーネント** タブに移動します。

   <div align="left"><figure><img src="https://225042527-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. 新しいブランチは **ブランチ** ページに一覧表示されます。

   <div align="left"><figure><img src="https://225042527-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/devops-ja/kdo/buranchino-1/buranchino.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.
