I have GitLab repository there and I need to test every merge request locally, before merging to the target branch.
How can I pull/fetch merge request as a new branch?<
This is also documented in GitLab online documentation : https://gitlab.com/help/user/project/merge_requests/index.md#checkout-merge-requests-locally
They supply this script (git alias) :
[alias]
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -
Then you can use this command :
git mr origin 4
So a new local branch mr-origin-4
will be created.