Skip to content

Commit c958ff0

Browse files
aharpolelucascosti
andauthored
Adding some extra detail around renaming (#4830)
Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com>
1 parent 075facb commit c958ff0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

content/github/administering-a-repository/renaming-a-branch.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ intro: You can change the name of a branch in a repository.
44
permissions: People with write permissions to a repository can rename a branch in the repository. People with admin permissions can rename the default branch.
55
versions:
66
free-pro-team: '*'
7-
enterprise-server: '>=3.1'
7+
enterprise-server: '>=3.2'
88
topics:
99
- repositories
1010
---
@@ -13,7 +13,9 @@ topics:
1313

1414
You can rename a branch in a repository on {% data variables.product.product_location %}. For more information about branches, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches)."
1515

16-
If you rename a branch, {% data variables.product.prodname_dotcom %} will automatically redirect links on {% if currentVersion == "free-pro-team@latest" %}{% data variables.product.prodname_dotcom_the_website %}{% else %}{% data variables.product.product_location_enterprise %}{% endif %} that contain the old branch name to the equivalent link on the renamed branch. {% data variables.product.prodname_dotcom %} will also update branch protection policies, as well as the base branch for open pull requests and draft releases.
16+
When you rename a branch on {% data variables.product.product_location %}, any URLs that contain the old branch name are automatically redirected to the equivalent URL for the renamed branch. Branch protection policies are also updated, as well as the base branch for open pull requests (including those for forks) and draft releases. After the rename is complete, {% data variables.product.prodname_dotcom %} provides instructions on the repository's home page directing contributors to update their local Git environments.
17+
18+
Although file URLs are automatically redirected, raw file URLs are not redirected. Also, {% data variables.product.prodname_dotcom %} does not perform any redirects if users perform a `git pull` for the previous branch name.
1719

1820
### Renaming a branch
1921

0 commit comments

Comments
 (0)