Incomplete Github Pages
设置远程仓库的默认分支
在Github远程仓库的Settings中设置Default branch为gh-pages
克隆远程仓库
将远程仓库克隆至本地仓库
$ git clone git@github.com:joriewong/LCTT-Helper.git
此时的本地仓库将不再是master
分支,而是gh-pages
分支
通过git branch
查看本地仓库当前分支
提交
监听开发过程中文件的变更
$ git add .
提交gh-pages
分支,附上提交信息gh-pages
$ git commit -m 'gh-pages'
[gh-pages 7a63de7] gh-pages
warning: LF will be replaced by CRLF in .idea/LCTT-Helper.iml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/modules.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/vcs.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/workspace.xml.
The file will have its original line endings in your working directory.
7 files changed, 807 insertions(+), 16 deletions(-)
create mode 100644 .idea/LCTT-Helper.iml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 .idea/workspace.xml
推送至远程仓库
git push
推送至Github远程仓库
$ git push origin gh-pages
Counting objects: 529, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (476/476), done.
Writing objects: 100% (529/529), 1.91 MiB | 111.00 KiB/s, done.
Total 529 (delta 46), reused 519 (delta 46)
remote: Resolving deltas: 100% (46/46), done.
To git@github.com:joriewong/LCTT-Helper.git
595650e..ad94414 gh-pages -> gh-pages
可以看到Github已经同步更新
配置Github-pages
在远程仓库的Settings中配置Github-pages