Merge pull request #28280 from github/create-branch-6670
add instructions for creating a branch
This commit is contained in:
BIN
assets/images/help/branches/branch-creation-popup.png
Normal file
BIN
assets/images/help/branches/branch-creation-popup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
assets/images/help/branches/branches-overview-link.png
Normal file
BIN
assets/images/help/branches/branches-overview-link.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
BIN
assets/images/help/branches/new-branch-button.png
Normal file
BIN
assets/images/help/branches/new-branch-button.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
@@ -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**.
|
||||

|
||||
2. In the dialog box, enter the branch name and optionally change the branch source.
|
||||
3. Click **Create branch**.
|
||||

|
||||
|
||||
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" %} **<em>NUMBER</em> branches** then choose another branch:
|
||||

|
||||
### 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.
|
||||

|
||||
1. Click the branch selector menu.
|
||||

|
||||
1. Type a unique name for your new branch, then select **Create branch**.
|
||||

|
||||
|
||||
{% 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 %}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
1. Above the list of files, click {% octicon "git-branch" aria-label="The branch icon" %} **<em>NUMBER</em> branches**.
|
||||

|
||||
1. Above the list of files, click {% octicon "git-branch" aria-label="The branch icon" %} **Branches**.
|
||||

|
||||
|
||||
Reference in New Issue
Block a user