How to build a hosted personal site using Github pages-updated in 2017.10.13 (partial handling)

Source: Internet
Author: User
Tags git commands

First PS: The tutorial is a great part of the blog Park a fellow, but after all, the Github version is more than the prefix, resulting in the inability to apply, the following is my (Blackatall) The latest version of the tutorial.

Before you begin your tutorial:

1, you need to write your own web page files.

2, register GitHub.

3. Download and install Git. Https://git-scm.com/downloads

Tutorial Start:(the test that appears below refers to your page name or whatever name you think of)

Step one : Log on to GitHub, create a new repository, name test, tick initialize this repository with a README, click Create Repository.

Step two : Open settings, have a GitHub pages setting, click on the original None in source, make it the master branch, that is, as a branch to deploy GitHub pages, then click Save.

Step three : After the page refreshes, look at the GitHub pages Settings box, a line of URLs, is your GitHub pages URL.

Click on this link, a static page generated, the content only a poor "test".

Step four : Open this computer, select a disk, such as F, right click on the blank, Git bash here.

Step Five : Enter the following command to create the test file on the F drive to put test repository on your GitHub, clone test repository to the test file.

This time your F-drive will be one more test file, open it,

will see a readme.md file, where does this file come from? Go back to Gihub and you will find that the README file is from the Master branch.

Step six : Copy and paste your Web page file into the test file on the F drive

Step eight : Execute the following command

Execute the CD test again, and then:

Explain the above command: Enter git status first to list all files in the current directory that are not yet managed by git, and files that have been managed and modified by git, but that have not yet been committed (git commit), that is, all the changed files, the red font is marked.

then enter git Add. (There is a point) to add all the files and subdirectories in the current directory,

Then enter git status again if you see the files are green, then it means they are ready to be committed (git commit).

Step Nine : Enter the following Red command,

git config--global user.email "your Mailbox"

git config--global user.name "your name"

Then upload your file to the remote master branch

Description: Git commit-m "you want to say words or notes", generally in the absence of input on the red command, will jump out of the warning to me who is you, and tells you to run the Red command.

Enter the last line of Git push, press ENTER, wait a minute, you need to fill in the user name Username for ' https://github.com ': Your name

There may be a popup box that lets you enter your github account and password again.

Wait patiently after OK.

When a statement like in appears, you have completed 99%.

last step : Open the browser input to your URL plus your uploaded HTML file name test.html, format:https://your name. github.io/test/test.html then press ENTER heavily.

Appendix I: Common git commands, the following brief description, please check http://www.jqhtml.com/7983.html

$ git clone//local if there is no remote code, do this step first, or ignore

$ CD//Navigate to your blog's directory

$ git status//See how many files you have modified locally

$ git Add. Add a git file that doesn't exist remotely

$ git commit-m "what I want told to someone"//Submit changes

$ git push//update to remote server

$ git RM//Remove Files

Appendix II: How to modify your Web page?

Method One: Modify directly in the Master branch on GitHub. (This method is recommended if you do not add a new file)

Method Two: The GitHub client makes modifications in sync. (If a new anthology is added, this method is recommended)

How to build a hosted personal site using Github pages-updated in 2017.10.13 (partial handling)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.