GitHub Pages简单实用

2017-01-05  本文已影响19人  SteveGuRen

在github创建repository

github里面创建一个新的仓库,仓库名称与拥有者(你的GitHub账号昵称或者组织名)的名称要一致,例如你的账户昵称叫username,那么仓库名字就叫username.github.io,创建完毕之后,你的仓库克隆地址会像
如下格式

https://github.com/username/username.github.io

第一步

首先从github克隆刚刚创建的仓库下来

$ git clone https://github.com/username/username.github.io

第二步

通过cd命令进入文件夹username.github.io,然后通过echo命令新建一个index.html,并将hello world输入到index.html

$ cd username.github.io
$ echo "Hello world" > index.html

第三步

将刚刚创建的index.html文件push到远程master主分支

$ git add --all
$ git commit -m "Initial commit"
$ git push -u origin master

最后

访问http://username.github.io

最后本人实现的博客

参考

gitPage官网:https://pages.github.com/

上一篇 下一篇

猜你喜欢

热点阅读