GitHub pages is a free static space hosting service provided by GitHub. It uses Git technology to conveniently and quickly deploy webpage files and supports binding personal domain names. GitHub pages is intended to provide developers with a place to publicize and demonstrate works, but as long as you use git, you can use it for free. My personal homepage is built with it.
Preparation: Register GitHub service, download and install git for Windows (select to download a file similar to Git-1.7. * -preview.exe)
Open the installed git bash and enter the following parameters in sequence:
git config --global user.name "your username"
git config --global user.email "username@email.com"
Make sure that the name and email information are consistent with the information registered at GitHub.
Create an SSH public keys and enter:
ssh-keygen -t rsa -C "username@email.com"
After you press enter, you will see a similar picture:
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Tekkub/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Tekkub/.ssh/id_rsa.
Your public key has been saved in /c/Users/Tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
e8:ae:60:8f:38:c2:98:1d:6d:84:60:8c:9e:dd:47:81 tekkub@gmail.com
In this case, the SSH public keys you need are saved inid_rsa.pub
File, find and open it, and copy the code to the corresponding region of account settings.
It will be much easier later, because you do not have to repeat the above steps unless you reinstall the system or change your machine.
In the default directory (in most casesMy Documents) To create a new directory, put your webpage files (such as. html. CSS. jpg and other static files), and then take the core step.
Similarly, open git bash and input the following parameters in sequence:
CD myhomepage // enter the new directory you created
Git init // Initialization
Git commit // submit it to GitHub and you will be asked to write a description, such as "My first submission" and "adding a few links ".
Done. Yes, you only need to perform these three steps to enter the directory, initialize, and submit. There is no step 4, and there will be no more in the future.
After dozens of seconds, GitHub will send you an insite email informing you that the website has been released successfully.