1. 查看本地分支列表:git branch

  2. 切换到需要修改的分支:git checkout 'old_branch_name'

  3. 修改分支名:git branch -m 'new_branch_name'

  4. 推送修改后的分支名到远程仓库:git push origin -u 'new_branch_name'

  5. 删除远程旧分支:`git push origin :'old_branch_name'

Git 修改分支名称并同步到远程仓库

原文地址: https://www.cveoy.top/t/topic/nGOl 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录