还是准备去自己写一篇git的使用总结,让自己加深下印象。
- github是一个网站,是目前最大的版本控制社区网站,用户可以在上面申请账号,并创建自己的版本仓库。
- git是一个最原始的分布式版本控制系统,是开源的
1. 注册github账号,并创建开源仓库
github的官网地址是https://github.com/ ,注册成功之后显示页面如下:

上图红色框点击可以新建开源仓库。

这样线上版本库已经创建成功

2. 下载github desktop
因为github就是个版本管理工具,创建文件还是在本地,所以这里需要再下载一个github desktop用于提交本地的文件。
下载地址是 https://desktop.github.com/

如图,可做下面三种操作:
- create new repository 创建一个项目并发步到github上
- add a local repository 添加一个本地计算机已经存在的项目并发布到github上
- clone a repository 从github线上克隆一个项目到本地
create new repository

填写项目名称、描述、本地路径,点击新建。

add a local repository
本地存在一个普通目录,转换为git目录,并上传到GitHub上



因为这是个普通文件,所以马上新建,点击new repository

如果这个文件夹不为空也没有关系

点击publish,上传项目到github
clone repository
从线上拉取项目

这里有三种方式

- github.com是自己线上的项目
- URL可以其他人的项目地址
选择项目,点击clone 就将线上的项目拉取到本地路径
网友评论