How do I rename a local Git branch?

后端 未结 30 1445
轻奢々
轻奢々 2020-11-22 11:48

I don\'t want to rename a remote branch, as described in Rename master branch for both local and remote Git repositories.

How can I rename a local branch wh

30条回答
  •  迷失自我
    2020-11-22 12:17

    Another option is not to use the command line at all. Git GUI clients such as SourceTree take away much of the syntactical learning curve / pain that causes questions such as this one to be amongst the most viewed on Stack Overflow.

    In SourceTree, right click on any local branch in the "Branches" pane on the left and select "Rename ...".

提交回复
热议问题