| Method | Shortcut / Command |
|---|---|
| VS Code Settings UI | Search “git autofetch” in Settings (Ctrl + ,) |
| settings.json | "git.autofetch": false |

What is Git Auto Fetch in VS Code?
Git auto fetch is a built-in feature in Visual Studio Code that automatically runs git fetch at regular intervals. This allows VS Code to show you how many commits your local branch is ahead or behind the remote repository.
While useful for staying updated, this background process can trigger a “Git Overheating Warning.” This happens when VS Code consumes excessive CPU or memory while polling large repositories or handling unstable network connections.
Disabling this feature stops the background polling. It is a common fix for developers experiencing lag, high fan noise, or battery drain while using VS Code on massive codebases.
Step-by-Step Solutions
Method 1: Using the Settings Menu (GUI)
The easiest way to disable auto fetch is through the visual settings interface. This is recommended for most users.
- Open VS Code.
- Press Ctrl + , (Windows/Linux) or Cmd + , (Mac) to open Settings.
- In the search bar at the top, type
git autofetch. - Locate the setting labeled Git: Autofetch.
- Uncheck the box to turn it off.
Method 2: Using settings.json
If you prefer editing configuration files directly, you can disable the feature via the settings.json file.
- Press Ctrl + Shift + P to open the Command Palette.
- Type “Open User Settings (JSON)” and press Enter.
- Add or modify the following line in your configuration block:
"git.autofetch": false
Save the file, and VS Code will immediately stop background fetching without requiring a restart.
Method 3: Disabling via Workspace Settings
Sometimes you only want to disable auto fetch for a specific project that is particularly large or resource-heavy.
- Navigate to your project’s root folder.
- Create or open the
.vscode/settings.jsonfile. - Add
"git.autofetch": falseto this file.
This ensures that auto fetch remains active for your smaller projects but stays disabled for the one causing performance issues.