In Team Explorer it prompts me to install 3rd party git tools, I don't intend on using the Git command line, just Visual Studio's native GUI to clone, pull, commit, sync, merge and maybe issue pull requests.
So do I need to install 3rd party Git command prompt tools (or Github extension)? because I already installed 2.10.1 and didn't notice anything different. What do I gain if I do and what do I lose if I don't, because I want a clean minimal installation, and all tutorials and docs out there assume I have to install them.
No you don't need a 3rd party git client (the Git for Windows should do). But some commands are not available through Visual Studio (yet), for example, you can't check the reflog and force-pushing is not available.
After installing Git For Windows, make sure its installation path is in your PATH environment variable and that you restart Visual Studio after installing it.
It is possible that Visual Studio won't detect it, if your version is much newer than what was available when your Visual Studio version shipped. In your case make sure you also have Visual Studio 2015 Update 3 installed.
Some background:
Visual Studio 2013 and 2015 ship with LibGit2 and LibGitSharp. LibGit2 is a library that implements most of the standard Git functionality in a cross platform C/C++ library. LibGitSharp is a managed wrapper around that. Not all commands are implemented directly in LibGit2, not everything LibGit2 is exposed directly in LibGitSharp.
The native integration has both advantages and disadvantages. While it's faster for some direct manipulation over shelling out to git.exe, it also makes the memory management much harder. Plus, any crashes or memory leaks in the native integration would slow down or take down the whole of Visual Studio.
By making the interaction with git out-of-process, each operation runs in its own little process and if that crashes or doesn't release its memory during execution, the command will fail, but Visual Studio will just see that git.exe is closing unexpectedly without it crashing too.
Also, by taking a dependency directly on git.exe, anything that's possible from the git command line is relatively easy to implement into Visual Studio, while in the past some features would not be available and would have to be coded in C# or in C++.
So, Visual Studio implements/exposes a number of git features directly, but some are not exposed. Features such as the RefLog, Force Push, Stash, Git Flow, Cherry Pick are not exposed though the Visual Studio UI at the moment. If you rely on these commands you will need an external git client. The commandline is the most universal example of such a client, but there are others that may help you out as well. GitKraken, SourceTree, Tower and others come to mind.
This might be in line with the recent tweet from Edward Thomson (also on Stack Overflow):
He is talking here about Johannes Schindelin, who got employed by Microsoft last August 2015, and who is releasing the Git for Windows editions.
So until recently, Visual Studio did not use a third party Git client, but now it does, with Visual Studio 15 (as commented by jessehouwing, VS 2015 doesn't come with its own
git.exe
, it uses a library instead).This is Visual Studio 15 Preview 5 (not Visual Studio 2015 which is v14.25123.xx)
See ycombinator.com:
The OP asks:
jessehouwing answers:
Personally, I like to "install" Git simply by uncompressing the latest archive like:
PortableGit-2.10.1-64-bit.7z.exe
anywhere I want.