Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create creating-a-branch-for-an-issue.md (#25077)
  • Loading branch information
dipree authored Mar 2, 2022
commit e3df9a631e4789f106eaa5d6f75d71d31be9850f
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/help/issues/create-a-branch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Creating a branch to work on an issue
intro: You can create a branch to work on an issue directly from the issue page and get started right away.
versions:
fpt: '*'
ghes: '>=3.5'
ghae: 'issue-6234'
ghec: '*'
allowTitleToDifferFromFilename: true
topics:
- Issues
shortTitle: Create branch for issue
---

{% note %}

**Note:** The ability to create a branch for an issue is currently in public beta and subject to change.

{% endnote %}

## About branches connected to an issue
Branches connected to an issue are shown under the "Development" section in the sidebar of an issue. When you create a pull request for one of these branches, it is automatically linked to the issue. The connection with that branch is removed and only the pull request is shown in the "Development" section. For more information, see "[Linking a pull request to an issue](/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)."

## Creating a branch for an issue

Anyone with write permission to a repository can create a branch for an issue. You can link multiple branches for an issue.

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-issues %}
3. In the list of issues, click the issue that you would like to create a branch for.
4. In the right sidebar under "Development", click **Create a branch**. If the issue already has a linked branch or pull request, click {% octicon "gear" aria-label="The Gear icon" %} and at the bottom of the drop-down menu click **Create a branch**.
![Screenshot showing Create a branch option highlighted in sidebar](/assets/images/help/issues/create-a-branch.png)
5. By default, the new branch is created in the current repository from the default branch. Edit the branch name and details as required in the "Create a branch for this issue" dialog.
![Screenshot showing Create a branch dialog options](/assets/images/help/issues/create-a-branch-options.png)
6. Choose whether to work on the branch locally or to open it in GitHub Desktop.
7. When you are ready to create the branch, click **Create branch**.
1 change: 1 addition & 0 deletions content/issues/tracking-your-work-with-issues/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ children:
- /creating-an-issue
- /about-task-lists
- /linking-a-pull-request-to-an-issue
- /creating-a-branch-for-an-issue
- /assigning-issues-and-pull-requests-to-other-github-users
- /viewing-all-of-your-issues-and-pull-requests
- /filtering-and-searching-issues-and-pull-requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ You can manually link up to ten issues to each pull request. The issue and pull
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-pr %}
3. In the list of pull requests, click the pull request that you'd like to link to an issue.
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6234 %}
4. In the right sidebar, in the "Development" section click {% octicon "gear" aria-label="The Gear icon" %}.
{% else %}
4. In the right sidebar, click **Linked issues**.
![Linked issues in the right sidebar](/assets/images/help/pull_requests/linked-issues.png)
{% endif %}
5. Click the issue you want to link to the pull request.
![Drop down to link issue](/assets/images/help/pull_requests/link-issue-drop-down.png)
{% endif %}
Expand Down