【发布时间】:2016-05-20 08:22:36
【问题描述】:
我正在尝试重命名我的项目的一个分支,使用
git branch -m old_branch_name new_brach_name
重命名本地分支,它工作得很好,并且本地分支被重命名。但是在从远程删除旧分支名称(在 github 或 git shell 中)并使用
git push origin new_branch_name
我得到这个输出
Counting objects: 92, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (60/60), done.
Writing objects: 100% (92/92), 488.48 KiB | 0 bytes/s, done.
Total 92 (delta 3), reused 0 (delta 0)
To https://github.com/<username>/<repo_name>.git
* [new branch] new_branch_name -> old_branch_name
旧分支名称仍然显示在远程和 github 上。
什么给了?我在这里用谷歌搜索和搜索了很多,我找不到其他人重命名分支并在将其推送到远程时让 git 重命名它的实例。
【问题讨论】:
标签: git github repository rename