0

git小技巧(6)——“git branch -m

Posted by nanxiao on 八月 11, 2015 in git小技巧 |

git branch -m <oldname> <newname>可以把branch重命名。例如:

[root@localhost test_git]# git branch
  master
* new
[root@localhost test_git]# git branch -m new new1
[root@localhost test_git]# git branch
  master
* new1

如果要重命名的就是当前branch,可以省略<oldname>

[root@localhost test_git]# git branch -m new2
[root@localhost test_git]# git branch
  master
* new2

标签:

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Copyright © 2013-2017 我的站点 All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.