标签:
在github上设置项目首页有三种方式
1.新建分支gh-pages
新建独立分支gh-pages
git checkout --orphan gh-pages
删除暂存区内容 git rm -rf .
增加项目内容
echo "project home page" > index.html
提交
git add .
git commit -m "gh-pages first commit"
git push origin gh-pages
完成后即可访问 http://<github username>.github.io/<github project name>/
特点:
2.在master分支上
在master分支上增加index.html文件作为项目首页
在github项目下的settings里设置:在GitHub Pages 里选择master branch 点击save按钮
完成后即可访问 http://<github username>.github.io/<github project name>/
特点:
3.在master的docs目录下
在master分支上docs目录下增加index.html文件作为项目首页
在github项目下的settings里设置:在GitHub Pages 里选择master branch/docs folder 点击save按钮
完成后即可访问 http://<github username>.github.io/<github project name>/
特点:
标签:
原文地址:http://www.cnblogs.com/fanyegong/p/5888154.html