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

git从github下载代码

时间:2016-06-20 18:30:31      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:

Github作为远程仓库的使用详解  http://blog.csdn.net/djl4104804/article/details/50778717

centos local:
    
    通过git remote来设置远程仓库地址:
        git remote add origin https://github.com/coder-pig/SimpleTea.git
        
    假如你想修改远程仓库地址,比如你把仓库托管换成了Git@OSC,你需要修改远程地址,可以键入:
        git remote set-url origin xxxx
        你也可以先删除origin然后再添加:
            git remote rm origin
            git remote add origin https://github.com/coder-pig/SimpleTea.git
            
    同步远程服务器更新(fetch VS pull)
        git fetch origin master
        git merge origin/master
        fetch和pull,尽管都可以获取远程服务器更新,但是两者却又是不一样的。
        首先说下fetch吧,仅仅只是从远处服务器获取到最新版本到本地,假如你不去合并(merge)
        的话,本地工作空间是不会发生变化的!
        
        用pull是一步到位的,或者说:pull = fetch + merge
        
    更新到某一版本:
        git checkout 28a24c0bc75fe305fbe9ee1b956f4658db2071f5;

 

=================

 

git使用说明 http://www.cnblogs.com/welfear/archive/2010/05/24/1742614.html

 

git从github下载代码

标签:

原文地址:http://www.cnblogs.com/mylinux/p/5601258.html

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