How do I rename branch on the GitHub website?

后端 未结 5 1531
花落未央
花落未央 2020-12-24 05:13

I don\'t know how to run command line stuff. I just don’t have the environment.

So I\'m trying to rename a branch on the GitHub website. It was, by default, named

5条回答
  •  天涯浪人
    2020-12-24 05:39

    It is not possible to rename a branch from the Github website. You will need to do the following -

    Setup your Git Environment

    Follow this - https://help.github.com/articles/set-up-git

    Rename branch locally & on Github

    git branch -m old_branch new_branch # Rename branch locally
    git push origin :old_branch # Delete the old branch
    git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote

提交回复
热议问题