There is an on-premise instance of gitlab installed. There are Visual Studio projects in this instance. What is the easiest way of connecting Visual Studio 2015 to one of the projects?
With GitHub, you can do it by selecting "Connect to GitHub" as on the following picture:
and then pasting the repository url. There is no GitLab option in the drop down. What is the easiest way of configuring Visual Studio 2015 to work with a solution from gitlab repository? By work I mean to have your usual source control bindings to the repository.
Note, that this question is probably useful in more general context of connecting to any git repository that is not GitHub, and does not have direct support with built-in Visual Studio menu, not just to GitLab repository.
Just right click on your solution and select Add to source control. Then select Git. Now your projects has been added to a local source control. Right click on one of your files and select Commit.
Open Visual Studio Code. Under Extensions, search for GitLab Workflow. Install the extension, then open the command palette by pressing Command + Shift + P . In the command palette, search for GitLab: Add Account and press Enter.
First, get the clone using command line:
git clone <repository url>
Then in Visual Studio, in the Team Explorer pane, select the connect button and look for Local Git Repositories "tab":
Press Add, as indicated on the picture, and select the folder you cloned your repository too.
When the process finishes, you can double-click the added repo to "connect" to it, and then select and open a solution it contains. After that follow your usual Visual Studio git workflow.
Now its simple to Use GitLab with Visual studio 2015 just add GitLab Extensions to Visual studio and you are there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With