0

I am trying to see a static html file. My github url is anuragasaurus.github.io and my repo name is js-playground, it contains a index.html file. I am trying to open anuragasaurus.github.io/js-playground/index.html but it's showing 404.

Can anybody tell me how can I access index.html file in my js-playground repo.

1
  • 1
    You must create a brach called hg-pages and place your index.html there. read this Commented May 1, 2017 at 12:32

1 Answer 1

1

In order to view your project files as static webpage, you should store your files not in default master branch but in gh-pages branch. You can create this branch using multiple methods but in order to find out the convenient one, you can use this GitHub Pages link.

Basically, let's assume that you already have master branch. If you are using git command line tool, you can do that with these steps:

  1. cd your-project-folder
  2. git checkout -b gh-pages (it will create new branch and switch to it)
  3. git push origin gh-pages (it will create new branch on GitHub repo and push the existing files to it)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.