|
|
@ -36,7 +36,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
在修改完成后,如果发现错误,可以撤回提交并再次修改并提交
|
|
|
|
在修改完成后,如果发现错误,可以撤回提交并再次修改并提交
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622135814482.png" alt="image-20220622135814482" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622135814482.png" alt="image-20220622135814482" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
#### 3.git的工作区、暂存区和版本库
|
|
|
|
#### 3.git的工作区、暂存区和版本库
|
|
|
|
|
|
|
|
|
|
|
@ -46,7 +46,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
版本库:工作区有一个隐藏目录.git,这个不算工作区,而是Git的版本库
|
|
|
|
版本库:工作区有一个隐藏目录.git,这个不算工作区,而是Git的版本库
|
|
|
|
|
|
|
|
|
|
|
|
![img](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/dnRUEOrwFBKKhx2PCx9LdA.png)
|
|
|
|
![img](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/dnRUEOrwFBKKhx2PCx9LdA.png)
|
|
|
|
|
|
|
|
|
|
|
|
#### 4.Git安装
|
|
|
|
#### 4.Git安装
|
|
|
|
|
|
|
|
|
|
|
@ -176,19 +176,19 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjwGC9van2xd2e2u1769g/SZfJadkC2qXwSMy1yQ9x
|
|
|
|
|
|
|
|
|
|
|
|
Github添加Git服务器秘钥:
|
|
|
|
Github添加Git服务器秘钥:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622145317159.png" alt="image-20220622145317159" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622145317159.png" alt="image-20220622145317159" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622145431860.png" alt="image-20220622145431860" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622145431860.png" alt="image-20220622145431860" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622145511169.png" alt="image-20220622145511169" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622145511169.png" alt="image-20220622145511169" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
Github创建仓库:
|
|
|
|
Github创建仓库:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622145700668.png" alt="image-20220622145700668" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622145700668.png" alt="image-20220622145700668" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
![image-20220622145819078](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622145819078.png)
|
|
|
|
![image-20220622145819078](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622145819078.png)
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622145843179.png" alt="image-20220622145843179" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622145843179.png" alt="image-20220622145843179" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
git服务器上创建项目并上传到github:
|
|
|
|
git服务器上创建项目并上传到github:
|
|
|
|
|
|
|
|
|
|
|
@ -218,9 +218,9 @@ Branch master set up to track remote branch master from origin.
|
|
|
|
|
|
|
|
|
|
|
|
github查看:
|
|
|
|
github查看:
|
|
|
|
|
|
|
|
|
|
|
|
![image-20220622161013603](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622161013603.png)
|
|
|
|
![image-20220622161013603](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622161013603.png)
|
|
|
|
|
|
|
|
|
|
|
|
![image-20220622161234927](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622161234927.png)
|
|
|
|
![image-20220622161234927](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622161234927.png)
|
|
|
|
|
|
|
|
|
|
|
|
注意:这样上传到github的分支不能跟main分支合并
|
|
|
|
注意:这样上传到github的分支不能跟main分支合并
|
|
|
|
|
|
|
|
|
|
|
@ -290,38 +290,38 @@ git commit -m "branch test" # 在dev分支上正常提交.
|
|
|
|
|
|
|
|
|
|
|
|
创建项目:
|
|
|
|
创建项目:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165005947.png" alt="image-20220622165005947" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165005947.png" alt="image-20220622165005947" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
创建分支:
|
|
|
|
创建分支:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165323873.png" alt="image-20220622165323873" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165323873.png" alt="image-20220622165323873" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
![image-20220622165356611](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165356611.png)
|
|
|
|
![image-20220622165356611](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165356611.png)
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165442604.png" alt="image-20220622165442604" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165442604.png" alt="image-20220622165442604" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
新分支创建文件:
|
|
|
|
新分支创建文件:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165459895.png" alt="image-20220622165459895" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165459895.png" alt="image-20220622165459895" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
![image-20220622165545788](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165545788.png)
|
|
|
|
![image-20220622165545788](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165545788.png)
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165616021.png" alt="image-20220622165616021" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165616021.png" alt="image-20220622165616021" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
分支合并:
|
|
|
|
分支合并:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165629824.png" alt="image-20220622165629824" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165629824.png" alt="image-20220622165629824" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165708029.png" alt="image-20220622165708029" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165708029.png" alt="image-20220622165708029" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165729534.png" alt="image-20220622165729534" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165729534.png" alt="image-20220622165729534" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165753134.png" alt="image-20220622165753134" style="zoom:50%;" />
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165753134.png" alt="image-20220622165753134" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
main分支验证是否合并成功:
|
|
|
|
main分支验证是否合并成功:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622165838735.png" alt="image-20220622165838735" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622165838735.png" alt="image-20220622165838735" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
#### 8.使用github上的项目
|
|
|
|
#### 8.使用github上的项目
|
|
|
|
|
|
|
|
|
|
|
@ -370,7 +370,7 @@ Branch main set up to track remote branch main from origin.
|
|
|
|
|
|
|
|
|
|
|
|
github验证:
|
|
|
|
github验证:
|
|
|
|
|
|
|
|
|
|
|
|
<img src="%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/image-20220622170829984.png" alt="image-20220622170829984" style="zoom:50%;" />
|
|
|
|
<img src="https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/image-20220622170829984.png" alt="image-20220622170829984" style="zoom:50%;" />
|
|
|
|
|
|
|
|
|
|
|
|
## 四:Gitlab部署与使用
|
|
|
|
## 四:Gitlab部署与使用
|
|
|
|
|
|
|
|
|
|
|
@ -544,7 +544,7 @@ quit # 退出交互界面
|
|
|
|
|
|
|
|
|
|
|
|
设置中文:
|
|
|
|
设置中文:
|
|
|
|
|
|
|
|
|
|
|
|
![img](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/E0dN8g2Is23hq_Rbnq0FsA.png)
|
|
|
|
![img](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/E0dN8g2Is23hq_Rbnq0FsA.png)
|
|
|
|
|
|
|
|
|
|
|
|
#### 11.Gitlab部署https方式
|
|
|
|
#### 11.Gitlab部署https方式
|
|
|
|
|
|
|
|
|
|
|
@ -724,7 +724,7 @@ ok: run: unicorn: (pid 6880) 0s
|
|
|
|
|
|
|
|
|
|
|
|
https://gitlab.example.com
|
|
|
|
https://gitlab.example.com
|
|
|
|
|
|
|
|
|
|
|
|
![img](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/ihL-gBXxpxFoNE25P-tY9g.png)
|
|
|
|
![img](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/ihL-gBXxpxFoNE25P-tY9g.png)
|
|
|
|
|
|
|
|
|
|
|
|
#### 13.Gitlab 添加 SMTP 邮件功能
|
|
|
|
#### 13.Gitlab 添加 SMTP 邮件功能
|
|
|
|
|
|
|
|
|
|
|
@ -830,7 +830,7 @@ irb(main):002:0>quit
|
|
|
|
|
|
|
|
|
|
|
|
邮箱客户端查看邮件:
|
|
|
|
邮箱客户端查看邮件:
|
|
|
|
|
|
|
|
|
|
|
|
![img](%E7%89%88%E6%9C%AC%E4%BB%93%E5%BA%93.assets/CxvKSD_S_9OPuLnUX2N4Mg.png)
|
|
|
|
![img](https://xingdian-image.oss-cn-beijing.aliyuncs.com/xingdian-image/CxvKSD_S_9OPuLnUX2N4Mg.png)
|
|
|
|
|
|
|
|
|
|
|
|
## 五:Gitlab 开发代码提交处理流程
|
|
|
|
## 五:Gitlab 开发代码提交处理流程
|
|
|
|
|
|
|
|
|
|
|
|