Git 上区分大小写的分支名称

Case sensitive branch names on Git

我有分支机构:

Stuff/myfirstbranch
Stuff/mysecondbranch

我还有另一个分支叫做:

stuff/mythirdbranch
stuff/myfourthbranch

注意 "s" 的大小写。

我想把大写的S改名为s。我该如何着手执行此操作并将更改推送到我的 git 服务器

首先,确保您与遥控器同步。那么:

# rename branch locally:
git branch -m Stuff/myfirstbranch stuff/myfirstbranch

# push new branch to remote:
git push origin stuff/myfirstbranch

# delete old branch on the remote:
git push origin :Stuff/myfirstbranch