Skip to content

Instantly share code, notes, and snippets.

@alysonla
Last active September 15, 2015 01:07
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alysonla/37194be32e7c90cff0ff to your computer and use it in GitHub Desktop.
Save alysonla/37194be32e7c90cff0ff to your computer and use it in GitHub Desktop.
GH Pages Cheatsheet

How to gh-pages

  1. Create a front-end project & name index.html
  2. cd into the project in terminal
  3. Run git init to initialize the git repo in the project
  4. Create & switch to branch called gh-pages - git checkout -b gh-pages
  5. Go to github.com the website and create a new repo
  6. Do not add a readme..
  7. Use the cheatsheat to add the remote - git add remote....
  8. Run git add . to add & stage all your files
  9. Run git commit - m "initial commit" - to commit w/ a message of your choice
  10. Run git push origin gh-pages - to push everything you just commited to the branch gh-pages
  11. Check out your new fancy webpage in the browser at http://username.github.io/repository
@MichaelOnePlus
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment