The Agent Git plug-in allows you to seamlessly integrate Visual Studio 2017 with Git.
Features of the plug-in include:
Below is a video showing Visual Studio, Agent Git and Git in action:
Described below are the step required to get Agent Git to work seamlessly with Visual Studio 2008 and Git.
As an introductory tutorial, it is recommended you follow these steps as described.
Inside Visual Studio use the Tools, Options menu and in the Source Control section select Agent Git as the active provider.
In the Environment section, configure the behaviour to suit.
Use the File, Source Control, Launch Agent Git menu to start the Agent Git configuration utility to do the once off configuration of the plug-in.
The resulting Agent Git configuration dialog is shown below:
You can use this dialog to configure the behaviour of the plug-in.
To see how Agent Git works we need something to play with so the next step is to create a simple test solution.
From within the Visual Studio IDE create a simple solution as shown below:
At this point, we have a new solution and we will use Agent Git to import the solution into the Git repository.
Use the menu shown below to add the solution to the Git repository:
That menu will result in the display of the project binding dialog shown below:
This dialog takes two inputs, a project name and a local folder location that contains the Git repository.
In this particular case hitting the Ok button will result in the following dialog:
The reason the dialog is displayed is because we are dealing with a new project and no Git repository exists for the project and as such the response should be Yes.
However, for the case where the project already has a Git repo the answer should be No and the path should then be modified to point to that existing Git repo.
After hitting Yes the IDE will indicate that the files have been added to the repo as shown below:
Use the repository browser to confirm the solution files are now inside the source control repository as shown below:
At this stage, the solution has been imported into the repository and the solution has been bound to the repository.
To check the solution is correctly bound use the View History menu on any of the files in the solution and the history dialog should be displayed as shown below:
With the solution now fully configured, use the check out, check in, revert, compare or any of the other source control commands to manage the files in the solution.
To access the source control from inside Visual Studio use the popup menu as shown below: