github operation: rename branch

1. Rename the branch

  • Rename the local branch:
$ git branch -m oldName newName
  • Delete the old branch corresponding to the remote:
$ git push origin --delete oldName
  • Push the new local branch to the remote:
$ git push -u origin newName

Guess you like

Origin blog.csdn.net/u014454538/article/details/103820705