How do I rename a branch in GitHub? #176725
-
|
Hi frnds i am newbie here.. |
Beta Was this translation helpful? Give feedback.
Answered by
SivaPrasath26
Oct 13, 2025
Replies: 2 comments
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can rename your branch in two ways:
If you’re on that branch locally:
git branch -m new-branch-name
git push origin -u new-branch-name
git push origin --delete old-branch-name
Or on GitHub:
Go to the Branches tab in your repository.
Find your branch and click the pencil icon next to its name.
Enter the new name and confirm.
GitHub will automatically update open pull requests to use the new branch name.
Either way should work. Hope this helps