github在windows下的安装和基本使用

1在win下安装github时花费的时间是非常长的,有时还会出现因各种原因安装不成功。离线包本地安装方便的解决了此问题。点击http://pan.baidu.com/s/1boGrNLP可下载,解压后直接点击运行GitHub.application,可快速安装。希望对大家有用。

2、经常用的一些命令

  • 查看远程仓库

 

1 E:\swiftdisk\swiftdisk_jclouds [master]> git remote -v
2 origin  https://github.com/lihanghang/swiftdisk_jclouds.git (fetch)
3 origin  https://github.com/lihanghang/swiftdisk_jclouds.git (push)

从返回结果可以看出只有一个初始化仓库

  • 从远程获取最新版本到本地
1 E:\swiftdisk\swiftdisk_jclouds [master]>  git fetch origin master
2 From https://github.com/lihanghang/swiftdisk_jclouds
3  * branch            master     -> FETCH_HEAD

git fetch origin master :从远程的origin仓库的master分支下载代码到本地的origin master

  •  比较本地的仓库和远程参考的区别
1 E:\swiftdisk\swiftdisk_jclouds [master]> git log -p master.. origin/master

因为我的本地仓库和远程仓库代码相同所以没有其他任何信息

  •  把远程下载下来的代码合并到本地仓库,远程的和本地的合并
1 E:\swiftdisk\swiftdisk_jclouds [master]> git merge origin/master
2 Already up-to-date.

我的本地参考代码和远程代码相同,所以是Already up-to-date

转载于:https://www.cnblogs.com/lihanghang/p/5666549.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值