码迷,mamicode.com
首页 > 其他好文 > 详细

git 命令

时间:2018-01-01 18:13:44      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:body   add   --   rename   name   nbsp   set   http   远程   

1 远程仓库的删除和重命名

查看本地关联的远程库

git remote -v

改名

git remote rename pb paul

表示把pb改成paul

删除远程库

git remote rm paul

表示删除远程库

2 git添加远程库

两个方法

2.1   git remote add origin2 http://xxx.git

这样是增加了一个独立的,有自己名字的远程库

 

2.2 如果是还想用origin这个名字,可以让origin增加url

git remote set-url --add origin http://xxx.git

这样git push时,就可以同时Push到多个库中,

 

git 命令

标签:body   add   --   rename   name   nbsp   set   http   远程   

原文地址:https://www.cnblogs.com/xqnq2007/p/8167940.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!