来源:https://opensource.com/article/22/5/git-branch-rename-delete-find-author
1. 重命名分支
git branch -m <old_branch_name> <new_branch_name>
- 重命名当前分支
git branch -m <new_branch_name>
2. 删除分支
- 强制删除本地分支
git branch -D <old_branch_name>
- 删除本地分支
git branch -d <name_of_the_branch>
- 删除远程分支
git push origin -d -f <old_branch_name>