navi组项目代码git操作说明
@(author)[刘翔鹏]
navi组下所有项目仓库已迁移至 http://192.168.1.189/navi 下

操作流程如下(以 tproxy
为例):####
1. 进入 tproxy
项目代码页面: http://192.168.1.189/navi/tproxy ,点击 Fork
,将代码 Fork
到自己的仓库中


2. Fork
成功后,将跳转至自己的 tproxy
仓库, 例如http://192.168.1.189/liuxp/tproxy

3. 复制自己仓库的git地址,在自己电脑上用source tree
,将代码 git clone
下来



4. git clone
成功后,在source tree
上可以看到如下图所示,本地电脑上的master
,gitlab上的origin/master
,origin/develop
,origin/HEAD
处于同一层级状态

5. 在sourse tree
上点击设置
,添加navi主仓库main,该仓库用于之后的拉取同步代码




6. 在sourse tree
上为本地电脑的仓库创建git flow
,自动创建develop分支



7. 在sourse tree
上从 gitlab navi main 拉取最新代码



8. 完成后可发现,在sourse tree
上本地电脑上的master
,develop
, gitlab上的origin/master
,origin/develop
,origin/HEAD
,main/master
,main/develop
处于同一层级状态

9. 后续任何本地操作只在develop分支中完成,提交代码先是提交到自己本地电脑的develop分支上,再推送到自己gitlab仓库上,即origin/develop


10. 将代码推送至自己gitlab仓库上,即origin/develop
后,在gitlab网页上,再向navi主仓库提出代码合并请求,注意合并也是将origin/develop
分支合并到main/develop
,一定不要合并到navi
的master
分支上



11. 提交合并后等待navi
主仓库管理员确认合并请求,会有多个开发人员向navi
主仓库的develop
分支提出合并请求,navi管理员确认请求后,此时需要在自己本地电脑上拉取navi
主仓库最新的develop
分支代码到本地


网友评论