
GitHub 是一个面向开源及私有软件项目的托管平台,因为只支持git 作为唯一的版本库格式进行托管,故名gitHub。
GitHub除了git代码仓库托管及基本的 Web管理界面以外,还提供了订阅、讨论组、文本渲染、在线文件编辑器、协作图谱(报表)、代码片段分享(Gist)等功能。目前,托管版本数量也是非常之多,其中不乏知名开源项目 Ruby on Rails、jQuery、python、Java 等。
更新内容
Ver:v1
- 设置主题
- 绑定域名
正文
Github作为开源代码库以及版本控制系统,已经成为了管理软件开发以及发现已有代码的首选方法。作为一个分布式的版本控制系统,在Git中并不存在主库这样的概念,每一份复制出的库都可以独立使用,任何两个库之间的不一致之处都可以进行合并。下面就来详细介绍一下Github的基本使用。
1. 页面介绍
首页打开 GitHub 官网https://github.com,注册账号并登录,进入个人主页。

Overview:展示个人主页信息
Repositories :存放代码的储存库,通常用于组织单个项目,存储库可以包含文件夹和文件、图像、视频、电子表格和数据集等任何你的项目所需要的内容
Stars:你收藏的仓库
Followers :关注你的人
Following:你关注的人
Contributions:你在 GitHub 的使用或贡献情况,每个方格代表一个日期,贡献程度随颜色加深而递增

Watch:设置接收邮件提醒
Star:收藏该仓库
Fork:该仓库被克隆至各用户仓库的次数
Code:显示该仓库的文件列表
Issues:用于BUG报告,功能添加,方向性讨论等
Pull requests:代码更改与讨论
Projects:对该仓库进行管理
Wiki:记录开发者之间共享的信息或软件文档
Insights:以图表形式显示该仓库各项指标
Settings:更改当前仓库的设置
commits:显示当前分支的提交历史
branches:查看仓库的分支列表
releases:显示仓库的标签列表
contributor:显示对该仓库进行过提交的程序员名单
Branch:默认显示当前仓库的分支
New pull request:创建新的请求
Create new file:创建文件
Upload files:上传文件
Find file:搜索文件
Clone or download:下载该仓库
2. 创建存储库
1)点击右上角“ + ”号选择 New Repository;

2)填写创建仓库信息并点击 Create repository;

3)仓库创建完成。

3. 上传文件
1)点击 Upload files;

2)点击 choose your files;

3)选择要上传的文件;

4)填写上传内容,点击 Commit changes.

4. 下载项目
1)点击 Clone or download;

2)选择点击 Download ZIP.

5. 修改文件
1)点击编辑按钮;

2)填写更新内容,点击 Commit changes.

6. 删除存储库
1)选择该仓库下的Settings

2)选择Settings —— Options

3)选择Options —— Danger Zone —— Delete this repository

4)输入删除仓库名称,输入密码确认删除。

7. 设置主题
1)选择Settings —— Options

2)选择Options —— GitHub Pages —— Choose a theme

3)选择自己喜欢的主题样式,然后点击 Select theme

设置完成后可以通过地址:https://用户名.github.io/项目名/
来查看你的网站主题
8. 绑定域名
1)选择Settings —— Options

2)选择Options —— GitHub Pages —— Custom domain 输入注册好的域名,点击Save保存。设置成功后,就可以在上面看见自己项目的域名地址,以后就可以通过域名地址来访问自己的项目。

未设置域名之前的项目地址:https://用户名.github.io/项目名/
设置域名之后的项目地址:https://域名/项目名/
结语
通过上面的介绍,希望可以帮助大家对Github的使用有更多地了解,可以更方便更高效地完成任务。
网友评论