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

相关文章:

  • 2022-12-23
  • 2021-08-11
  • 2022-12-23
  • 2021-09-24
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
猜你喜欢
  • 2022-01-02
  • 2021-11-16
  • 2021-09-22
相关资源
相似解决方案