Github实例教程-创建库、创建主页

2023-05-30,,

以README文件为实例,具体介绍github的使用过程

请先下载git,然后配置下面内容: ( 我的系统是debian,其它版本号的UNIX/Linux有区别),windows的临时不清楚。

(一)

1.先下载git

$ apt-get install git-core

2.创建gitusername(Username),首先你要告诉git你的名字,这样它才干正确的给你提交的的东西打上标签。

(First you need to tell git your name, so that it can properly label the commits you make.)

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

3.创建用户Email,注意一点。这个git的Email与注冊github帐号的Email一致

Email

(Git saves your email address into the commits you make. We use the email address to associate your commits with your GitHub account.)

$git config --global user.email "your_email@example.com"

( 二)

1.登入github。创建知识库

再单击这个大大的绿色button,就完毕了在github创建项目的过程。

2.在自己的电脑上创建一个README文件

  1.每一个项目之前,先创建一个文件夹

  2. 进入文件夹。初始化

  3.建立README,在此里面写入Hello,World!

3.提交你的README,使用下面命令

4.发表你的提交,使用下面命令

git remote add origin https://github.com/username/Hello-World.git
git push origin master

5.如今你能够打开你的github主页的Hello-World库

---------------------------------------------以下的先不用看了,有问题。----------------

------------------------2014 04 30-----------------

以下简单的说说如何建立Github Pages

github pages 分为两种。User Pages和Project Pages

我们以User Pages为例,同一时候利用上面的东西。来共同完毕这次奇异之旅!

1.将我们上面创建的库项目的URL复制下来,在github 项目页面的右下角有快捷方式

然后在终端运行下面命令

$ git clone https://github.com/username/username.github.io.git
$ cd username.github.io
//注意。这里easy出错,cd进入的是你克隆在本地的文件夹

接着写入一个仅仅有"Hello,World"的index.html的主页

最后。打开

http://username.github.io

Github实例教程-创建库、创建主页的相关教程结束。

《Github实例教程-创建库、创建主页.doc》

下载本文的Word格式文档,以方便收藏与打印。