轉載網址:https://blog.csdn.net/weixin_38208401/article/details/80342122
https://blog.csdn.net/intheair100/article/details/60875422
如今很多項目都採取merge request方式來進行codereview,所有掌握merge request很有必要,步驟如下:
1、現在本地用創建一個本地分支,比如叫xx_branch。
2、改動xx_branch你需要改動的代碼。
3、進入你的項目根目錄下,運行如下命令,將xx_branch推到遠程分支。
git add .
git commit -a -m 'xxxxx'
git push origin xx_branch
4、在gitlab上面操作,進入xx項目下,點擊merge request選項,然後選擇你之前推到遠端的xx_branch和你要合併到哪個分支,比如你要合併到master上。
5、點擊merge request。
截圖步驟:
1、git merge request
1)fork:項目主分支上建立一個分支
成功後:
2)和以往一樣的操作(https://blog.csdn.net/weixin_38208401/article/details/72518258)
- clone新分支
- 修改代碼
- status
- add file
- commit
- push
3)新分支中New Merge Request
選擇代碼審覈人 Assignee
4、審覈人在通知中可查看到
審覈人點擊Merge
結果: