Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Git Auto Fetcher
Git Auto Fetcher

Git Auto Fetcher

Preview

Tyler Smart

|
1 install
| (0) | Free
Automatically fetches Git remotes for the repository containing the open solution.
Download

Git Auto Fetcher

A Visual Studio extension that periodically fetches Git remotes for the repository containing the open solution — the same idea as VS Code’s Git: Autofetch and Git: Autofetch Period.

Visual Studio’s Git status bar already shows how far ahead or behind you are. This extension keeps those remote-tracking refs up to date so you do not have to fetch by hand.

Features

  • Automatic git fetch on a timer after a solution is fully loaded
  • Three modes, matching VS Code:
    • Disabled
    • Default remote (git fetch)
    • All remotes (git fetch --all)
  • Configurable interval in seconds (default 180)
  • Settings dialog from Extensions → Auto Fetch…
  • Settings persisted by Visual Studio (also visible under Extensions → Extension Settings (experimental))
  • Quiet Git invocations: no console window, no interactive credential prompt, 2-minute command timeout
  • Overlapping fetches are not started; changing settings restarts the timer

Requirements

  • Visual Studio 2022 17.14 or later, or Visual Studio 2026
  • Git available on PATH (git)
  • A Git repository that contains the open .sln / solution

The Visual Studio Git workload is recommended so the status bar can show updated ahead/behind counts after a fetch.

Install

From a VSIX (local build)

  1. Build the project (see Build).
  2. Double-click GitAutoFetcher\bin\Debug\net8.0-windows8.0\GitAutoFetcher.vsix, or in Visual Studio choose Extensions → Manage Extensions → Install from VSIX.
  3. Restart Visual Studio if prompted.

Marketplace publication is not set up yet. Until then, install from a VSIX you built or received from a release.

Usage

  1. Open a solution that lives in a Git repository.
  2. Choose Extensions → Auto Fetch…
  3. Set Auto Fetch to Default remote or All remotes, and set Period (seconds) if you want a different interval.
  4. Choose OK.

The extension loads when the solution is fully loaded. At each interval it finds the Git root for that solution and runs the configured fetch. If there is no solution, or the solution is not in a Git repo, the cycle is skipped.

You can also search for Auto Fetch with Ctrl+Q.

Configuration

Setting Values Default Meaning
Auto Fetch Disabled / Default remote / All remotes Disabled Whether to fetch, and which remotes
Auto Fetch Period Integer ≥ 1 180 Seconds between fetches

Settings apply to the Visual Studio installation (user settings), not per solution.

How it works

The extension is an out-of-process VisualStudio.Extensibility package. After a solution loads, a background timer:

  1. Queries the open solution path
  2. Runs git rev-parse --show-toplevel to find the repository root
  3. Runs git fetch or git fetch --all

It does not merge, pull, or push. Visual Studio’s Git UI typically refreshes ahead/behind counts after the fetch completes.

Limitations

  • Open Folder workspaces (no .sln) are not included yet.
  • Only the repository that contains the open solution is fetched, not every repo in a multi-root tree unless they share that root.
  • There is no item on the Git status-bar flyout; configuration lives under Extensions.
  • Authentication uses the Git credential helper already configured on the machine. Interactive GIT_TERMINAL_PROMPT is disabled so a missing helper does not hang the IDE.
  • Each Git command is killed if it runs longer than two minutes.

Build

Prerequisites: .NET 8 SDK and Visual Studio with the Visual Studio extension development workload if you want to debug in the Experimental Instance.

dotnet build .\GitAutoFetcher.slnx

Output:

GitAutoFetcher\bin\Debug\net8.0-windows8.0\GitAutoFetcher.vsix

Debug in Visual Studio

  1. Open GitAutoFetcher.slnx in Visual Studio 2022/2026.
  2. Set GitAutoFetcher as the startup project.
  3. Press F5 to launch the Experimental Instance.
  4. Open a Git-backed solution in that instance and use Extensions → Auto Fetch…

Contributing

Issues and pull requests are welcome.

  • Keep changes focused; match the existing C# style (file-scoped namespaces, nullable enabled).
  • Do not commit secrets, .vs/, bin/, or obj/.
  • After behavior changes, rebuild the VSIX and smoke-test: disable, default remote, all remotes, and an invalid period (must be ≥ 1).

License

This project is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft