2

I have a recent version of VS2019 installed and I have "Git for Windows" installed via the VS2019 Installer.

In "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin" I have git version 2.29.2.windows.4

But in "C:\Program Files\Git\bin" is version git version 2.31.1.windows.1. This is the version on %PATH% as evidenced if I run where git. I'm not sure where this came from but I assume TortoiseGit or another tool installed it.

Which will VS2019 use internally - does its internal version override or get overiden by my %PATH%? Where can I find which version of git is installed by each version of VS2019, I can't see it in VS release notes? Really I would rather have a single version of git used everywhere to avoid any confusion, what's the best way to do this?

Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
  • [Possibly relevant](https://stackoverflow.com/q/57904284/10871073)? TLDR: VS looks in the "config" file in the relevant ".git" folder. – Adrian Mole Oct 08 '21 at 14:44
  • @AdrianMole that sounds a bit of a lottery which tool was last used?! – Mr. Boy Oct 08 '21 at 15:06
  • 1
    VS use its own version because that's the version they have validated against VS. They don't want to use another version that could have incompatibilities and that could break the whole git feature. But you don't care because git internal format is very stable and nearly all the versions could interact with the same repository. So use your own very and VS will have its own without introducing problems. – Philippe Oct 08 '21 at 22:43

0 Answers0