相关疑难解决方法(0)

如何重命名git本地和远程分支名称

我有4个像主人一样的分支 - > origin/regacy,FeatureA - > origin/FeatureA.
如上所示,我键入了错误的名称.

所以我想重命名一个远程分支名称(origin/regacy => origin/legacy或origin/master)

我试着在下面命令:

git remote rename regacy legacy
Run Code Online (Sandbox Code Playgroud)

但是git console向我返回了错误消息.

 error : Could not rename config section 'remote.regacy' to 'remote.legacy'
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

git rename repository git-branch

329
推荐指数
13
解决办法
19万
查看次数

标签 统计

git ×1

git-branch ×1

rename ×1

repository ×1