Skip to content

Instantly share code, notes, and snippets.

@hmemcpy
Last active November 21, 2023 16:46
Show Gist options
  • Save hmemcpy/5bc6b5cc11050b502ca3 to your computer and use it in GitHub Desktop.
Save hmemcpy/5bc6b5cc11050b502ca3 to your computer and use it in GitHub Desktop.
Disabling Visual Studio Git Provider

Here's how to disable the package that is responsible for loading the Git source control support in Visual Studio. Use at your own risk!

  • Create a file called devenv.pkgundef and place it next to devenv.exe in you Visual Studio's Common7\IDE (you'll need elevation for this)
  • Add the following entries to the file:
[$RootKey$\Packages\{7fe30a77-37f9-4cf2-83dd-96b207028e1b}]
[$RootKey$\SourceControlProviders\{11b8e6d7-c08b-4385-b321-321078cdd1f8}]
  • Close VS if open, open a Developer command prompt, and type devenv /updateconfiguration
  • Start VS, and voilla - Git support no more!

To undo, delete the devenv.pkgundef file, and run devenv /updateconfiguration again.

@zewt
Copy link

zewt commented Mar 17, 2016

Thanks. It would be nice if VS would actually disable Git integration when I tell it to, instead of nodding enthusiastically and then continuing to read hundreds of MB of data off disk that isn't even in the project every time I build.

@bvkrishnna
Copy link

whenever adding devenv.pkgundef this files
[$RootKey$\Packages{7fe30a77-37f9-4cf2-83dd-96b207028e1b}]
[$RootKey$\SourceControlProviders{11b8e6d7-c08b-4385-b321-321078cdd1f8}]
Close VS if open, open a Developer command prompt, and type devenv /updateconfiguration
Error will come

Copy link

ghost commented May 20, 2018

you have to open command prompt inside the IDE folder where devenv.exe is - not sure if this method still works in practice.

The file and the update config was OK, I just have to see if it did anything, I undeffed about 50 packages the bloat I never need, stuff like team foundation, git, click once publishing, all the other gimmick, so far some of the menus/buttons are still there.

@memory-of-a-dream
Copy link

Worked for me but I have to ask. Why is all this lap dance required?
Seriously I want to be able to choose my own repository for source control not have VS shove it down my throat.

@CowboyChalo
Copy link

Stoopid arse employee in charge of Git and trying to make name!

@DJawna
Copy link

DJawna commented Mar 25, 2019

does not seem to work for visual studio 2017, what is the GUID for the git plugin there? or how can i find it out?

@salimi-hamza
Copy link

Hello , how I can remove the git using visual studio installer 2017 ?

@AndersBillLinden
Copy link

Does not work for me in vs 2017 enterprise.

@joel-anderson
Copy link

Thank you!
Shamelessly duplicated with modifications here:
https://developercommunity.visualstudio.com/solutions/587860/view.html

@kingsimba
Copy link

For me, in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
Rename VssProvider.dll and Microsoft.TeamFoundation.Git.Provider.dll to *.bak will disable Git integration.

@TheSnowfield
Copy link

For me, in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional"
Rename VssProvider.dll and Microsoft.TeamFoundation.Git.Provider.dll to *.bak will disable Git integration.

It works for me but Visual Studio thrown an exception while starting. Thanks.

@slackingfred
Copy link

Is it safe to simply delete the directory containing the buit-in Git install of Visual Studio?

@smaudet
Copy link

smaudet commented Sep 12, 2022

Can confirm the dll trick still works as of VS 16.11.4

The undef thing does not seem to function, though...

@WillHensel
Copy link

The dll trick is still working on VS 17.7.2

I was also unable to get the undef method working. Thanks @kingsimba.

@ixtxi
Copy link

ixtxi commented Oct 19, 2023

For me the pkgundef method works on VS 17.7.5 but the file should be named as master.pkgundef.

@iceman2299
Copy link

iceman2299 commented Nov 21, 2023

For me, in "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional" Rename VssProvider.dll and Microsoft.TeamFoundation.Git.Provider.dll to *.bak will disable Git integration.

sure it works (but mine studio is 2022), but visual studio can not compile anything now, it crashes and restarts. So hate this integration. Now i think only temporary renaming .git folder in project can be useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment