Every update I've applied to Visual Studio 2017 has broken Git again. Until 15.1 (26403.0), the solution was to delete Visual Studio's version of Git and let it pick up the version installed in Windows. I documented this in my post on troubleshooting the Visual Studio 2017 upgrade.

The problem manifests itself when you try to push changes to a remote Git repository. It fails and this error shows up in the output window:

Error encountered while pushing to the remote repository: Git failed with a fatal error.

PushCommand.ExecutePushCommand

As of the latest 15.1 update to Visual Studio 2017, the solution I posted previously no longer works. Fortunately, Toby figured it out and posted the answer at Stack Overflow. I've applied his solution and it worked.

Here is the solution:

  1. Delete this folder (backing it up in case you need to restore it):

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git

  1. Uninstall all versions of Git via Control Panel / Uninstall a program.
  2. Run the Visual Studio 2017 installer and modify the install to remove Git For Windows.
  3. Download the latest version of Git and install it.
  4. Run the Visual Studio 2017 installer again and modify the install to add Git For Windows again.

I think the problem is that when I originally installed Visual Studio, it was using a later version of Git and that caused conflicts with the installed Git, even after updating the installed Git. Until 15.1, removing Visual Studio's version of Git fixed the problem, but 15.1 no longer falls back to the installed Git, so removing the Git folder produces a different error.

I'm optimistic that this solution will fix the problem for good, as it appears to work by getting the installed Git and Visual Studio's Git completely in sync. However, only time will tell and I'll have to wait for the next update to Visual Studio to find out.