Skip to content

Instantly share code, notes, and snippets.

@luxiaojian
Created March 22, 2015 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxiaojian/496b6d1f0d573297b5b9 to your computer and use it in GitHub Desktop.
Save luxiaojian/496b6d1f0d573297b5b9 to your computer and use it in GitHub Desktop.
build gh-pages on github
1.git checkout -b gh-pages
2.rm .git/index
3.git add index.html
4.git reset --hard $(echo "branch gh-pages init." | git commit-tree $(git write-tree)) //用Git底层命令创建新的根提交,并将分支gh-pages重置。
5.git push -u origin gh-pages
6.git add -A
7.git commit -m 'add all'
8.git push -u origin gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment