git checkout --orphan gh-pages
親を持たない空っぽのブランチが生成される
git clean -fdx
- f = うっかり防止でコレがないと削除しない
- d = ディレクトリも削除
- x = 無視ファイルも削除
要するに、なんでもかんでも削除。(.gitは残っているはず)
git rm -rf
でもいいかも。
echo hello, world > index.html
git add index.html
git commit -m "first page commit"
git push origin gh-pages
master を既に -u オプション付きでpushしていれば
git push
だけでも良さそう。