DEV Community

I.G
I.G

Posted on

How to rename the base branch of your opened PR in GitHub

Conclusion

All you have to do is rename the branch in GitHub.

  1. Open your repository's branches page (/{your_user_id}/{your_repository_name}/branches) and rename the branch.

  2. Then, all PRs that had the branch as a base branch automatically are updated and the base branch is also changed to the renamed one.

※ But, the PR that had the branch as a head branch doesn't be updated automatically. So, you need to re-create a new pull request once more.

cf. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/renaming-a-branch

Top comments (0)