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

Git-远程仓库的使用

时间:2019-10-28 20:46:33      阅读:84      评论:0      收藏:0      [点我收藏+]

标签:add   远程仓库   inf   自己   服务   sch   添加   git fetch   应该   

查看远程仓库

git remote:查看已经配置的远程仓库服务器

如果你已经克隆了自己饿仓库,那么至少应该能看到origin

技术图片

 

 

添加指定选项-v,会显示需要读写远程仓库使用的Git保存的简写URL

git remote -v

origin https://github.com/schacon/ticgit(fetch)

origin https://github.com/schacon/ticgit(push)

 

添加远程仓库

git remote add <shortname> <url>

 

技术图片

 

 

从远程仓库中抓取与拉取

 

git fetch [remote-name]

这个命令会访问远程仓库,从中拉取所有你还没有的数据。

 

 

推送到远程仓库

git push origin master

 

 

查看某个远程仓库

git remote show origin

 

 

远程仓库的移除与重命名

 

将pb重命名为paul,可以用git remote rename:

git remote rename pb paul

git remote 

git remote rm paul

git remote 

 

Git-远程仓库的使用

标签:add   远程仓库   inf   自己   服务   sch   添加   git fetch   应该   

原文地址:https://www.cnblogs.com/zhichun/p/11755157.html

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