其他分享
首页 > 其他分享> > git分支改名

git分支改名

作者:互联网

title author date CreateTime categories
git 分支改名 lindexi 2018-11-3 12:49:9 +0800 2018-2-13 17:23:3 +0800 git

给一个git分支改名的方法很简单

如果对于分支不是当前分支,可以使用下面代码:

    git branch -m 原名 新

例如当前的分支是 master 分支,想要修改 t/lindexi 分支为 t/lindexiIsDoubi

可以使用下面的代码

git branch -m t/lindexi t/lindexiIsDoubi

如果是修改当前的分支,直接修改为新的名字就可以了

        git branch -m 新的分支名 

如当前的分支是 master 分支,想要将他修改 t/lindexiIsDoubi 分支,可以使用下面的代码

git branch -m t/lindexiIsDoubi

参见:

http://zengrong.net/post/1746.htm

标签:git,改名,lindexiIsDoubi,修改,branch,lindexi,分支
来源: https://blog.51cto.com/u_11283245/2954079