Thursday, February 27, 2014

GitHub Pages for Existing Repository from Command Line



$ cd /path/to/repo

$ git checkout -b gh-pages

$ git branch --list
* gh-pages
  master
$ cat > index.html

Test Page for GitHub Pages
ctrl-d


$ git add index.html
$ git commit -m "changed header" index.html

$ git push origin gh-pages


In this example, my git username is codetricity. My git repository is swarm_gen2. The URL is http://codetricity.github.io/swarm_gen2

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete