参考:https://stackoverflow.com/questions/44992512/how-to-checkout-merge-request-locally-and-create-new-local-branch

Pull merge request to new branch

git fetch origin merge-requests/REQUESTID/head:BRANCHNAME
i.e git fetch origin merge-requests/10/head:file_upload

Checkout to newly created branch
git checkout BRANCHNAME
i.e (git checkout file_upload)

OR with single command
git fetch origin merge-requests/REQUESTID/head:BRANCHNAME && git checkout BRANCHNAME
i.e git fetch origin merge-requests/18/head:file_upload && git checkout file_upload
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐