如何重命名分支以删除大写? [英] How to rename branch to remove capitalization?

查看:78
本文介绍了如何重命名分支以删除大写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将分支命名为Name而不是name,并希望将其更改为后者.

I named a branch Name instead of name and would like to change it to the latter.

我尝试在本地重命名分支:

I tried renaming the branch locally:

git branch -m tmp

删除github上的分支:

Deleting the branch on github:

git push origin --delete Name

重命名临时分支:

git branch -m name

将分支推送到github:

Pushing the branch to github:

 git push origin name

但是当我将分支推送到github时,我得到以下输出:

But when I push the branch to github, I get this output:

Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/xx/xx.git
 * [new branch]      name -> Name

为什么在我推送分支时github重命名了分支?如何将我的分支从Name重命名为name?

Why did github rename the branch when I pushed it? How can I rename my branch from Name to name?

推荐答案

使用git push origin name:name定义如何在服务器上调用分支.您的.git/config文件中可能有未更新的远程分支名称.

Use git push origin name:name to define how the branch will be called on the server. You probably have the remote branch name in your .git/config file which was not updated.

这篇关于如何重命名分支以删除大写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆