GitHub入门与实践(2)掌握Git 5、从远程仓库获取

来源:互联网 发布:skype官网for mac 编辑:程序博客网 时间:2024/06/10 06:10
    1)获取远程仓库 
        git clone
        $ git clone git@github.com:jamsonwoo/git-tutorial.git        Cloning into 'git-tutorial'...        Enter passphrase for key '/c/Documents and Settings/Administrator/.ssh/id_rsa':        remote: Counting objects: 20, done.        remote: Compressing objects: 100% (6/6), done.        remote: Total 20 (delta 3), reused 20 (delta 3), pack-reused 0        Receiving objects: 100% (20/20), done.        Resolving deltas: 100% (3/3), done.        Checking connectivity... done        $ cd git-tutorial/        $ git branch -a        * master          remotes/origin/HEAD -> origin/master          remotes/origin/feature-D          remotes/origin/master        $ git checkout -b feature-D origin/feature-D        Branch feature-D set up to track remote branch feature-D from origin.        Switched to a new branch 'feature-D'        $ git diff        diff --git a/README.md b/README.md        index c194c43..617cdfb 100644        --- a/README.md        +++ b/README.md        @@ -2,4 +2,5 @@           - feature-A           - fix-B        -  - feature-C        \ No newline at end of file        +  - feature-C        +  - feature-D        \ No newline at end of file        $ git commit -am "Add feature-D"        [feature-D 3b33297] Add feature-D         1 file changed, 2 insertions(+), 1 deletion(-)        $ git push        Counting objects: 5, done.        Delta compression using up to 2 threads.        Compressing objects: 100% (2/2), done.        Writing objects: 100% (3/3), 280 bytes | 0 bytes/s, done.        Total 3 (delta 0), reused 0 (delta 0)        To git@github.com:jamsonwoo/git-tutorial.git           b306656..3b33297  feature-D -> feature-D
    2)获取最新的远程仓库分支
        git pull
        $ cd ../../git-tutorial        $ git pull origin feature-D        Enter passphrase for key '/c/Documents and Settings/Administrator/.ssh/id_rsa':        remote: Counting objects: 3, done.        remote: Compressing objects: 100% (2/2), done.        remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0        Unpacking objects: 100% (3/3), done.        From github.com:jamsonwoo/git-tutorial         * branch            feature-D  -> FETCH_HEAD           b306656..3b33297  feature-D  -> origin/feature-D        Updating b306656..3b33297        Fast-forward         README.md | 3 ++-         1 file changed, 2 insertions(+), 1 deletion(-)

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 微信里别人可以看到我手机号怎么办 用手机号注册的微信换号后怎么办 微信群推送名片很多人加怎么办 志高制冷显示ff怎么办 百度账号手机号换了怎么办 别人盗取手机号的通讯录该怎么办 58简历看不到真实号码怎么办 淘宝更换手机号码说已注册怎么办 系统把qq冻结了怎么办 qq被永久冻结好友怎么办 群发不小心发错怎么办 qq群成员满了怎么办 qq知道密码没手机号验证怎么办 改房本上的名字怎么办 支付宝租给别人怎么办 微信麻将房间卡怎么办 皮肤挤伤了发黑怎么办 指甲被挤了黑了怎么办 手指被挤了变黑怎么办 榆次买房太原户口怎么办 皮肤又红又黑怎么办 打仙桃晃晃老输怎么办 微信支付忘了摇怎么办 苹果手机微信摇一摇摇不了怎么办 打麻将牌背的时候怎么办 打麻将背的时候怎么办 同城游台球初使化失败怎么办 qq密码改忘了怎么办啊 qq头像显示不出来怎么办 qq的重要数据被清理怎么办 把qq数据删除了怎么办 手机qq头像显示不同怎么办 手机qq图片显示不出来怎么办 微信群聊右上角双人头像没了怎么办 支付宝好友没了怎么办 手机qq好友头像没了怎么办 微信语音变成听筒模式怎么办 微信语音为听筒模式怎么办 微信设置成听筒模式怎么办 微信验证看不全怎么办 qq看视频无法放大怎么办