使用gitlab发起merge request,审查代码/markdown方案

1. 添加变更到暂存区,并提交到本地仓库

# cd /path/to/repository

# git add . 

# git commit -m "imageclean solution"

2. 代码库命令行,手动创建分支,并push

  • 查看本repository所有的branch,包括本地与远程,以及它们的上游分支和最后一次commit信息
# git branch -a --help

List both remote-tracking branches and local branches.


# git branch -v --help

show hash and subject, give twice for upstream branch


查看本地分支与远程追踪分支
# git branch -a -vv

* master 9ed5c7c [origin/master: ahead 1] imageclean solution
 remotes/origin/3-docker      ebea172 python package 依赖
 remotes/origin/HEAD                    -> origin/master
 remotes/origin/front-end-dev         d17bfaf 提交前端修改
 remotes/origin/master        ebea172 python package 依赖
  • 创建分支image-clean-cron,并设置其为远程跟踪分支
创建本地分支image-clean-cron
# git branch image-clean-cron


切换本地分支image-clean-cron
# git checkout image-clean-cron


查看本地分支与远程追踪分支
# git branch -a -vv

* image-clean-cron        9ed5c7c [origin/image-clean-cron] imageclean-solution
  master       9ed5c7c [origin/master: ahead 1] solution
  remotes/origin/3-docker     ebea172 python package 依赖
  remotes/origin/HEAD                   -> origin/master
  remotes/origin/front-end-dev        d17bfaf 提交前端修改
  remotes/origin/master       ebea172 python package 依赖
  

提交本地分支代码到远程分支
# git push origin image-clean-cron -u

git: 'credential-gnome-keyring' is not a git command. See 'git --help'.
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 1.45 KiB | 1.45 MiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote:
remote: To create a merge request for image-clean-cron, visit:
remote:   http://202.38.69.240:10070/LeiNao/pai-maintain/merge_requests/new?merge_request%5Bsource_branch%5D=image-clean-cron
remote:
To http://202.38.69.240:10070/LeiNao/pai-maintain.git
 * [new branch]      image-clean-cron -> image-clean-cron
Branch 'image-clean-cron' set up to track remote branch 'image-clean-cron' from 'origin'.


查看推送后的本地分支与远程分支
# git branch -a -vv

* image-clean-cron    9ed5c7c [origin/image-clean-cron] imageclean solution
  master     9ed5c7c [origin/master: ahead 1]   solution
  remotes/origin/3-docker     ebea172 python package 依赖
  remotes/origin/HEAD                   -> origin/master
  remotes/origin/front-end-dev        d17bfaf 提交前端修改
  remotes/origin/image-clean-cron 9ed5c7c imageclean solution
  remotes/origin/master       ebea172 python package 依赖

3. gitlab网页端,手动创建merge request

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值