diff --git a/assets/images/help/branches/branch-creation-popup.png b/assets/images/help/branches/branch-creation-popup.png new file mode 100644 index 0000000000..1c87d7be37 Binary files /dev/null and b/assets/images/help/branches/branch-creation-popup.png differ diff --git a/assets/images/help/branches/branches-overview-link.png b/assets/images/help/branches/branches-overview-link.png new file mode 100644 index 0000000000..0289bd7bc5 Binary files /dev/null and b/assets/images/help/branches/branches-overview-link.png differ diff --git a/assets/images/help/branches/new-branch-button.png b/assets/images/help/branches/new-branch-button.png new file mode 100644 index 0000000000..26c6de63e4 Binary files /dev/null and b/assets/images/help/branches/new-branch-button.png differ diff --git a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md index 4a13da81ee..d8da09b019 100644 --- a/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md +++ b/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository.md @@ -15,17 +15,37 @@ topics: - Pull requests shortTitle: Create & delete branches --- + ## Creating a branch +You can create a branch in different ways on {% data variables.product.product_name %}. +{% note %} + +**Note:** You can only create a branch in a repository to which you have push access. + +{% endnote %} + +### Creating a branch via the branches overview {% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.navigate-to-branches %} +1. Click **New branch**. + ![Screenshot of branches overview page with new branch button emphasized](/assets/images/help/branches/new-branch-button.png) +2. In the dialog box, enter the branch name and optionally change the branch source. +3. Click **Create branch**. + ![Screenshot of branch creation modal with create branch button emphasized](/assets/images/help/branches/branch-creation-popup.png) -1. Optionally, if you want to create your new branch from a branch other than the default branch for the repository, click {% octicon "git-branch" aria-label="The branch icon" %} **NUMBER branches** then choose another branch: - ![Branches link on overview page](/assets/images/help/branches/branches-link.png) +### Creating a branch using the branch dropdown +{% data reusables.repositories.navigate-to-repo %} +1. Optionally, if you want to create the new branch from a branch other than the default branch of the repository, click {% octicon "git-branch" aria-label="The branch icon" %} **Branches** then choose another branch. + ![Branches link on overview page](/assets/images/help/branches/branches-overview-link.png) 1. Click the branch selector menu. ![branch selector menu](/assets/images/help/branch/branch-selection-dropdown.png) 1. Type a unique name for your new branch, then select **Create branch**. ![branch creation text box](/assets/images/help/branch/branch-creation-text-box.png) - +{% ifversion fpt or ghec or ghes > 3.4 %} +### Creating a branch for an issue +You can create a branch to work on an issue directly from the issue page and get started right away. For more information, see "[Creating a branch to work on an issue](/issues/tracking-your-work-with-issues/creating-a-branch-for-an-issue)". +{% endif %} ## Deleting a branch {% data reusables.pull_requests.automatically-delete-branches %} diff --git a/data/reusables/repositories/navigate-to-branches.md b/data/reusables/repositories/navigate-to-branches.md index 1991424939..8fefe13cd8 100644 --- a/data/reusables/repositories/navigate-to-branches.md +++ b/data/reusables/repositories/navigate-to-branches.md @@ -1,2 +1,2 @@ -1. Above the list of files, click {% octicon "git-branch" aria-label="The branch icon" %} **NUMBER branches**. - ![Branches link on overview page](/assets/images/help/branches/branches-link.png) +1. Above the list of files, click {% octicon "git-branch" aria-label="The branch icon" %} **Branches**. + ![Branches link on overview page](/assets/images/help/branches/branches-overview-link.png)