快速学会使用git
一,认识git和github
git是一个版本管理工具。(控制系统)
github是全球最大的同性交友平台。(平台)用于项目托管。
仓库(repository):每个项目对应一个项目仓库。
收藏(star):被超过100个==牛逼。
复制克隆(fork):从别人的仓库那里复制仓库,自动标识仓库来源。(特别注意这是独立存在的)
复制的长裤更新源代码Pull request发起请求到原仓库,原仓库主人考虑合并到原项目。
1.安装git
(1)下载git从官网下载https://git-scm.com/

(2).点击安装一路next finsh

二.如何新建仓库
1.新建仓库【仓库名.github.io】
2.在仓库下新建index.html的文件.




4.地址栏访问

注意事项:github pages仅仅支持静态网页
三,如何使用git
1.基本工作流程(本地仓库)
2.右击新建git bash hera
3.促使化命令
设置用户名:$ git config --global user.name'Caigengliang'
设置邮箱:git config --global user.email1022994235@gmail.com
查看信息;git config –list

2.远程仓库
克隆;git clone https://github.com/Caigengliang/Caigengliang.github.io.git

提交更新
Git add filename
Git commit -m信息
Git push


网友评论