After talking to the developers who works on the version control support. If this is a new local repo, then there is no remote setup, which could be why that check box is not enabled. In Visual Studio 2012 or above, open Team Explorer and click on the Connection button: Under the Local Git Repositories section, click the Clone Once the Git repository is cloned, it means it has been downloaded on the local machine and Visual Studio’s Team Explorer window will display the.
A couple of weeks ago I wrote an introductory article “” which aimed at introducing Git to beginners on the basis of Git’s underlying tree structure. Since that article turned out to be quite popular and since I’m currently planning an introduction for our.Net devs on that topic, I decided to write this article, using a similar approach, but show-casing the use of Git from within Visual Studio. Terminology For getting introduced to the Git terminology, please refer to my.
Workstation/Visual Studio Setup Recently Microsoft seems to recognize Git as a valuable alternative to its proprietary TFS (Team Foundation Server) to what regards version control and as such it started to release its own Visual Studio extension which is currently in “preview” phase. You can find it here: wrote about it as well. I quickly tried the plugin and although it perfectly integrates with Visual Studio (mostly like TFS), it is still too much beta for my taste. Currently the best alternative I found is to install Git Extensions for Windows and Git Source Control Provider Visual Studio Plugin.
The following sections go through their corresponding installations. Install Git Extensions for Windows The first step is to download Git Extensions from the corresponding. Its installation wizard will install everything you need to have a complete Git setup, installing Git (from ) to the different Unix tools to the Git Bash.
After you have installed everything, make sure all entries of the Git Extension’s checklist pass for having a trouble-free Git experience. You find this checklist when opening the Git Extensions application, and then by navigating to Plugins Settings. Installing Git Source Control Provider is an open source extension that uses your machine’s Git installation and integrates it into Visual Studio. If you have successfully setup Git (following the procedure mentioned before), you can go ahead and install the Git Source Control Provider extension for Visual Studio. The easiest way is probably through its “Extensions and Updates” dialog where you have to simply search for “git source control”. Installation through the Visual Studio Extensions and Updates mechanism As one of the next steps you need to correctly set the source code provider within Visual Studio as you might have more of them (i.e TFS).
This is done in Visual Studio’s preferences in the “Source Control” section: Configuring the source control provider You should see an entry saying “Git Source Control Provider”. Choose that one and confirm your setting. After that you should also make sure it references your Git and Git Extensions installations correctly: Configuring your SSH key Many Git server repositories allow for different authentication models:. through https or. by generating an SSH key.
Personally, I prefer the latter as I hate to continuously enter my credentials. To get a guide on generating a public SSH key just consult the which is quite detailed and well explained. Well, that’s it for the installation part. You should now be ready to get started. Let’s get started: Create a new Git Repository First of all, I simply create a Console project, as the focus here is not on creating something nice and working, but rather to demonstrate Git’s integration into Visual Studio. Once the project is created we can set up the local Git repository.