Skip to content

Commit b3f3d22

Browse files
authored
Warn that renaming branches breaks actions
1 parent fc4223f commit b3f3d22

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ You can rename a branch in a repository on {% data variables.product.product_loc
1515

1616
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.
1717

18+
GitHub workflows do not follow renames, so if your repository publishes an action, anyone using that action with `@{old-branch-name}` will break. You should consider adding a new branch with the original content plus an additional commit reporting that the banch name is deprecated and suggesting that users migrate to the new branch name.
19+
1820
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.
1921

2022
### Renaming a branch

0 commit comments

Comments
 (0)