How to checkout merge request locally, and create new local branch?

  1. 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

  2. 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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)