I just renamed my local branch using
git branch -m oldname newname
but this only renames the local version of the branch. How can I rename the one on GitHub?
I just renamed my local branch using
git branch -m oldname newname
but this only renames the local version of the branch. How can I rename the one on GitHub?
You can rename a branch with the GitHub REST API.
And you can easily run API commands via the gh
CLI all like this:
gh api "repos/{owner}/{repo}/branches/{branch}/rename" -f new_name={newBranch}