Make sure you have a file called index.html
. Create a branch:
$>git checkout -b gh-pages
$>git branch
master
*gh-pages
commit changes:
$>git add -A
$>git commit -m 'commit files for gh-pages'
push to origin:
$>git push -u master gh-pages
go back to master:
$>git checkout master
now when you open a broswer at: [your git user name].github.io/[repo name]
your index.html
will be served.
To add magic to git config to auto push update to gh-pages when master updates, see next file.
see auto-gh-pages
below