如何注册Github?
注册使用Github步骤
1.登陆网站https://github.com,点击Sign up(注册),如图-11所示。
图-11
2.填写注册信息(用户名,邮箱,密码),如图-12所示。
图-12
- 初始化操作,如图-13和图-14所示。
图-13
图-14
注意,初始化完成后,到邮箱中去**Github账户。
- 创建仓库、使用仓库
点击Start a project(如图-15所示),
图-15
填写项目名称(项目名称任意),如图-16所示。
图-16
往仓库中上传文件或新建文件,如图-17所示
图-17
下载仓库中的代码,如图-18所示。
图-18
- 命令行操作(需要联网的主机,如真实机)
[[email protected] ~]# yum -y install git
[[email protected] ~]# git clone https://github.com/账户名称/仓库名称
#clone指令用于将服务器仓库中的资料打包下载到本地
[[email protected] ~]# cd 仓库名称
[[email protected] ~]# 任意修改文件,或新建文件
[[email protected] ~]# git add .
#add添加新文件
[[email protected] ~]# git commit -m “test”
[[email protected] ~]# git push
#commit和push实现提交代码的功能
[[email protected] ~]# git pull
#pull可以从githuab服务器拉取数据到本地