GitHub使用1

1.安装git
首先去git官网下载git,https://git-scm.com/downloads,下载.exe格式并安装
github 的下载

2.创建公钥所需 的ssh key
$ ssh-keygen -t rsa -C “894139169@qq.com”
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/administer/.ssh/id_rsa): //回车
Enter passphrase (empty for no passphrase): //回车
Enter same passphrase again: //回车
Your identification has been saved in /c/Users/administer/.ssh/id_rsa.
Your public key has been saved in /c/Users/administer/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:GY1MJPNxHVa17h6cDrKf5G83hV4B0pZang/hZ727gpY 894139169@qq.com
The key’s randomart image is:
+—[RSA 2048]—-+
| o.+ ..+oo..|
| * = o.B .|
| = . B +..|
| o . =.+.|
| S =oo|
| +o+|
| .o+ *o|
| E=.*+o|
| …++=+|
+—-[SHA256]—–+

3.在github中添加公钥
在github中setting中选择ssh key 菜单,点击add ssh key,将公钥复制到该地方
$ cat ~/.ssh/id_rsa.pub //显示公钥
ssh-rsa 公钥密码 894139169@qq.com

4.私钥与github进行认证
$ ssh -T git@github.com
The authenticity of host ‘github.com (192.30.255.112)’ can’t be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘github.com,192.30.255.112’ (RSA) to the list of know n hosts.
Hi ting163! You’ve successfully authenticated, but GitHub does not provide shell access.

5.github的基本操作

1.复制文件到本地
$ git clone https://github.com/ting163/test
Cloning into ‘test’… //将ting163/test文件复制到本地test文件夹下
remote: Counting objects: 18, done.
remote: Total 18 (delta 0), reused 0 (delta 0), pack-reused 18
Unpacking objects: 100% (18/18), done.

2.添加文件到github
touchmain//main vim main //编辑文件,main为文件名
cat main ///查看文件内容
i表示插入字符
退出时:esc->:wq->回车

3.通过git add命令将该文件加入到缓存区
$ git add main
warning: LF will be replaced by CRLF in main.
The file will have its original line endings in your working directory.

4.通过git commit命令进行提交
$ git commit -m “Add main”
[master d67a71a] Add main
1 file changed, 1 insertion(+)
create mode 100644 main

5.通过git log 查看提交日志
$ git log
commit d67a71af059cdfa4b288e963870791256057ef31 (HEAD -> master)
Author: ting163 <894139169@qq.com>
Date: Wed Sep 13 23:04:51 2017 +0800
Add main

6.通过push ,github仓库才能被更新
$ git push
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 259 bytes | 129.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/ting163/test

6.遇到的问题:
Not a git repository (or any of the parent directories): .git
这说明你当前的路径并不是一个git库,必须进入到库对应的文件夹内,git命令才有效

Github下载地址:https://github.com/XLAccount/MiaoBo 项目详解地址:http://www.code4app.com/blog-843201-350.html 快速集成RTMP的视频推流教程:http://www.code4app.com/blog-843201-315.html ffmpeg常用命令操作:http://www.code4app.com/blog-843201-326.html #关于IJKMediaFramework/IJKMediaFramework.h找不到的问题,下载后直接拉到项目中即可 下载地址:https://pan.baidu.com/s/1boPOomN 密码::9yd8 #BUG修复: 解决登录程序偶尔崩溃,修复轮播图片和页面控制器叠加等问题,修复新浪授权登录 (2016.9.7) 解决程序运行中偶尔崩溃问题,解决连续下拉刷新崩溃问题,优化代码 (2016.9.8) 优化直播页面,减少不必要的性能消耗,增加用户体验 (2016.9.11) 适配5s以上的机型除了6sPlus和6Plus延迟较大外,其余延迟都较小,网速好的话可以忽略不计 (2016.9.12) 新版本极大优化程序性能,修复关注数据异常等小问题,重新布局热门页面,减少因反复加载带来的性能消耗 (2016.9.13) 增加个人中心页面,采用下拉放大图片 ➕ 波纹效果 (2016.9.14) ![image text](https://github.com/XLAccount/ALLGIFS/blob/master/psb.gif) 展示图片 ![image](https://github.com/XLAccount/ALLGIFS/blob/master/psb-1.gif) 展示图片 ![image text](https://github.com/XLAccount/ALLGIFS/blob/master/psb-2.gif) 展示图片 ![image text](https://github.com/XLAccount/ALLGIFS/blob/master/psb-3.gif) 展示图片 感谢大神Monkey_ALin http://www.jianshu.com/users/9723687edfb5/latest_articles 的demo支持
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值