If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.
Go to the folder where you want to store your project, and clone the new repository:
~$git clone https://github.com/username/username.github.io
Enter the project folder and add an index.html file:
~$echo "Hello World" > index.html
Add, commit, and push your changes:
~$git add --all
~$git commit -m "Initial commit"
~$git push -u origin master
Fire up a browser and go to https://username.github.io.
You have the option to start with one of the pre-built themes,
or to create a site from scratch.
Head over to GitHub.com and create a new repository, or go to an existing one.
Click on the Settings tab.
Scroll down to the GitHub Pages section. Press Choose a theme.
Choose one of the themes from the carousel at the top.
When you're done, click Select theme on the right.
Use the editor to add content to your site.
Enter a commit comment and click on Commit changes below the editor.
Fire up a browser and go to http://username.github.io/repository.
Want to use your own custom domain for a GitHub Pages site? Just create a file named CNAME and include your URL. Read more.
Learn how to create custom 404 pages, use submodules, and learn more about GitHub Pages.