Make the current Git branch a master branch

前端 未结 14 2145
悲&欢浪女
悲&欢浪女 2020-11-22 05:29

I have a repository in Git. I made a branch, then did some changes both to the master and to the branch.

Then, tens of commits later, I realized the branch is in muc

14条回答
  •  执笔经年
    2020-11-22 06:14

    If you are using eGit in Eclipse:

    • Right click on the project node.
    • Choose Team → then Advanced → then Rename branch
    • Then expand the remote tracking folder.
    • Choose the branch with the wrong name, then click the rename button, rename it to whatever the new name.
    • Choose the new master, then rename it to master.

提交回复
热议问题