Instructions for checking out a branch in MR do not work on Windows
Summary
In any merge request, the "Code" button can be pressed and "Check out branch" selected. Then the following instructions will be displayed:
These instructions do not work on Windows (Linux work). After entering the first command, an error is displayed:
> git fetch "git@gitlab.com:gitlab-community/gitlab-org/gitlab.git" 'n7800/issue509818'
fatal: couldn't find remote ref 'n7800/issue509818'
It turns out that the issue is in the quotes. The repository is specified in double quotes, but the branch name is in single quotes. They should also be double.
Using the command in the second line will also lead to unexpected results. Single quotes will be used as part of the branch name. A folder 'gitlab-n7800
will be created in the .git\refs\heads
folder, and a subfolder issue509818'
will be created in it.
In the last underlined command in the screenshot, the quotes should also be corrected to double.
Additional
This bug happens on GitLab.com