- Create a new repository named username.github.io, where username is your username (or organization name) on GitHub. If the first part of the repository doesn’t exactly match your username, it won’t work.
- Clone the repository --> 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:
cd username.github.ioecho "Hello World" > index.html
- Push it --> Add, commit, and push your changes:
git add --allgit commit -m "Initial commit"git push -u origin master
- Fire up a browser and go to https://username.github.io.