一、创建仓库
1、点击 “New repository”

2、在Repository name 的方框内,填写上仓库的名字。description 内写我的描述,勾选下面的public 和 initialize this repository width a README

3、点击“create repository” 既一个仓库创建完毕

二、从仓库下载项目到本地
1、复制仓库的地址 /有一点需要注意,需要选择clone with SSH,如果不是请点击 复制按钮方的use ssh/

2、打开git bash,克隆git仓库到本地
- git clone url url为git仓库的地址

- 如果有报错,提示

需要设置公钥私钥,下面是设置公钥私钥的步骤
1)输入命令 ssh-keygen -t rsa -b 4096 -C "3170771196@qq.com" 其中c为大写,双引号的邮箱随便写自己的邮箱即可。输入后出现如下图所示

2)生成的秘钥在c盘,把名字为 id_rsa.pub打开,把里面的内容,全选复制。

3)打开github,选择setings---SSH and GPG keys


4)在重新 git clone 就可以了,克隆完成好就可以到下载的仓库了

三、演示仓库的内容
1)打开要演示的仓库,选择settings

2)找到github pages ,选择master branch,点击save保存,

3)即可看到在github pages 下边一行显示了一个链接,点击链接

4)点击链接,演示要演示的内容,默认读取index的内容,如果其他,请在打开的链接后面,加上路径,文件名

网友评论