Skip to content

Commit e3df9a6

Browse files
authored
Create creating-a-branch-for-an-issue.md (#25077)
1 parent 868e377 commit e3df9a6

File tree

5 files changed

+41
-0
lines changed

5 files changed

+41
-0
lines changed
Loading
37.1 KB
Loading
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Creating a branch to work on an issue
3+
intro: You can create a branch to work on an issue directly from the issue page and get started right away.
4+
versions:
5+
fpt: '*'
6+
ghes: '>=3.5'
7+
ghae: 'issue-6234'
8+
ghec: '*'
9+
allowTitleToDifferFromFilename: true
10+
topics:
11+
- Issues
12+
shortTitle: Create branch for issue
13+
---
14+
15+
{% note %}
16+
17+
**Note:** The ability to create a branch for an issue is currently in public beta and subject to change.
18+
19+
{% endnote %}
20+
21+
## About branches connected to an issue
22+
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)."
23+
24+
## Creating a branch for an issue
25+
26+
Anyone with write permission to a repository can create a branch for an issue. You can link multiple branches for an issue.
27+
28+
{% data reusables.repositories.navigate-to-repo %}
29+
{% data reusables.repositories.sidebar-issues %}
30+
3. In the list of issues, click the issue that you would like to create a branch for.
31+
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**.
32+
![Screenshot showing Create a branch option highlighted in sidebar](/assets/images/help/issues/create-a-branch.png)
33+
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.
34+
![Screenshot showing Create a branch dialog options](/assets/images/help/issues/create-a-branch-options.png)
35+
6. Choose whether to work on the branch locally or to open it in GitHub Desktop.
36+
7. When you are ready to create the branch, click **Create branch**.

content/issues/tracking-your-work-with-issues/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ children:
1515
- /creating-an-issue
1616
- /about-task-lists
1717
- /linking-a-pull-request-to-an-issue
18+
- /creating-a-branch-for-an-issue
1819
- /assigning-issues-and-pull-requests-to-other-github-users
1920
- /viewing-all-of-your-issues-and-pull-requests
2021
- /filtering-and-searching-issues-and-pull-requests

content/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,12 @@ You can manually link up to ten issues to each pull request. The issue and pull
7171
{% data reusables.repositories.navigate-to-repo %}
7272
{% data reusables.repositories.sidebar-pr %}
7373
3. In the list of pull requests, click the pull request that you'd like to link to an issue.
74+
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6234 %}
75+
4. In the right sidebar, in the "Development" section click {% octicon "gear" aria-label="The Gear icon" %}.
76+
{% else %}
7477
4. In the right sidebar, click **Linked issues**.
7578
![Linked issues in the right sidebar](/assets/images/help/pull_requests/linked-issues.png)
79+
{% endif %}
7680
5. Click the issue you want to link to the pull request.
7781
![Drop down to link issue](/assets/images/help/pull_requests/link-issue-drop-down.png)
7882
{% endif %}

0 commit comments

Comments
 (0)