首页 > 其他 > 详细

git - 远程仓库的删除和重命名

时间:2017-09-06 19:01:25      阅读:253      评论:0      收藏:0      [点我收藏+]

在新版 Git 中可以用 git remote rename 命令修改某个远程仓库在本地的简称,比如想把 pb 改成paul,可以这么运行:

$ git remote rename pb paul
$ git remote
origin
paul

注意,对远程仓库的重命名,也会使对应的分支名称发生变化,原来的 pb/master 分支现在成了paul/master

碰到远端仓库服务器迁移,或者原来的克隆镜像不再使用,又或者某个参与者不再贡献代码,那么需要移除对应的远端仓库,可以运行 git remote rm 命令:

$ git remote rm paul
$ git remote
origin

git - 远程仓库的删除和重命名

原文:http://www.cnblogs.com/byron-li/p/7486237.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!