Windows 建立 GitHub Pages

Windows 建立 GitHub Pages(用户页面)


  • |
  • 浏览:627
  • |
  • 更新:2014-03-27 10:22

https://pages.github.com/

1. Create a repository:建立仓库

Head over to GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub.

首要步骤是建立一个以你用户名开头的仓库,形如:用户名.github.io

If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.

如果仓库名与用户名不匹配,将不会生成页面。

Windows 建立 GitHub Pages

Windows 建立 GitHub Pages

2. Use terminal 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

建议安装:RailsInstaller

http://railsinstaller.org/

Windows 建立 GitHub Pages

Windows 建立 GitHub Pages

3. Hello World:建立内容为 hello world 的文件

Enter the project folder and add an index.html file:

进入目录,建立 index.html 文件。

  • cd username.github.io

  • echo "Hello World" > index.html

Windows 建立 GitHub Pages

4. Push it:推送

Add, commit, and push your changes:

执行命令推送至仓库

  • git add --all

  • git commit -m "Initial commit"

  • git push

Windows 建立 GitHub Pages

…and you're done!

完成

Fire up a browser and go to http://username.github.io. Give it a couple of minutes for your page to show up—there will be a delay this very first time. In the future, changes will show up pretty much instantly.

第一次设立页面需要花费几分钟的时间,然后你启动浏览器,访问 http://用户名.github.io。今后修改基本上能立即呈现。

Windows 建立 GitHub Pages

软件基本信息

Windows 建立 GitHub Pages
名称:Github