Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove git integrations from VSCode

I downloaded Visual Studio Code to try out at work and I'm in love with almost everything about it. One part I am not in love with though: Git integration.

I imported my entire working folder (~14000 source files + git items), and the layout and everything within Visual Studio Code is awesome. I moved from our traditional code editor to this, because it seemed to work a lot better for me.

My main issue though, is if I am working in a file and save it, Visual Studio Code freezes up for roughly 30-60 seconds. At first I was confused, but then I noticed that the Git tab was "working." From my best guess, after I save a file it is traversing all ~14000 files and doing something - I'm not sure what. Does anyone know if there is a way to remove Git integration from VSC, or at least have it ignore doing whatever it thinks it is doing?

like image 558
Andrew Corsini Avatar asked May 19 '15 16:05

Andrew Corsini


People also ask

How do I remove a Git repository from VS Code?

Right-click the project in the Project Explorer panel and then choose Source Control > Delete Repository from the context menu.

How do I unlink Git from Visual Studio?

In the top right corner of visual studio, you see the icon of your microsoft account. Click on it and choose Account Settings. A windows will open then in which you will be able to remove your github account.

How do I disable VS Code in GitHub?

Go to settings (shift+CMD+P MacOS) and search github authentication . Remove the checkbox for Controls ... enable automatic Github authentication.. and VSCode should stop popping up the Github/Microsoft login.


5 Answers

Add this to settings.json:

// Whether git is enabled.
"git.enabled": false,

Some other commands related to Git execution:

// Path and filename of the git executable, e.g. `C:\Program Files\Git\bin\git.exe` (Windows).
"git.path": null,

// When enabled, commits will automatically be fetched from the default remote of the current Git repository.
"git.autofetch": false,
like image 67
msdos Avatar answered Oct 06 '22 04:10

msdos


It's very simple to do, requiring no code. Follow these steps:

1) Navigate to VSCode's settings: enter image description here

2) Next, navigate to User Settings, then go to Extensions -> Git -> Enabled (property) as shown: enter image description here

Make sure this checkbox is disabled.

like image 20
George Avatar answered Oct 06 '22 05:10

George


Windows:

Go to File -> Preferences Settings (Or press Ctrl + ,)

enter image description here

Go to Extensions -> Git -> Uncheck "Enabled" (Or search "git.enabled" in the search box above)

enter image description here

like image 35
The One Avatar answered Oct 06 '22 04:10

The One


In Visual Studio Code you can change your settings quite easily.

Once opened you have a 2 column window to choose from a set of standard options. The more extensions you install the longer this list of standard options becomes. There you can also choose from a set of GIT options.

Here is preview image of some of the preferences:

preview of preferences

like image 30
Vaeshkar Avatar answered Oct 06 '22 05:10

Vaeshkar


Just one addition to the accepted answer:

By default, Visual Studio Code also parsers .gitignore files, and avoids searching in "Git ignored" files, even if Git integration is disabled. To disable this feature and allow searching in all files, add the following line to your settings.json file:

"search.useIgnoreFiles": false,
like image 39
wovano Avatar answered Oct 06 '22 05:10

wovano