Virtual File System for Git: Enable Git at Enterprise Scale
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.azure-pipelines Update path to built kext in Jan 9, 2019
GVFS Merge pull request #827: Improve perf of prefetch when using large --… Feb 23, 2019
GitHooksLoader Add missed CommonAssemblyVersion to Virtualization and bump copyright… Dec 17, 2018
MirrorProvider Refactor PrjFS.xcworkspace into PrjFS.xcodeproj Jan 9, 2019
ProjFS.Mac Mac: Matches up KextLog levels with os_log levels Feb 22, 2019
Scripts Update RunFunctionalTests to not load kext when testing installed gvfs Feb 19, 2019
.editorconfig Introduce EditorConfig to help define consistent coding style Dec 27, 2018
.gitattributes Current snapshot of GVFS Feb 3, 2017
.gitignore Update gitignore for new TestResult filenames Dec 12, 2018 O(modified) May 23, 2017
GVFS.sln Introduce EditorConfig to help define consistent coding style Dec 27, 2018 Automount and other updates: Jun 28, 2017 Current snapshot of GVFS Feb 3, 2017 Perf improvements and bug fixes: Oct 24, 2017 Reflect comment Jan 16, 2019
nuget.config Migrate nuget feeds Oct 26, 2018

VFS for Git


Branch Unit Tests Functional Tests Large Repo Perf Large Repo Build
master Build status Build status Build status Build status
shipped Build status Build status Build status Build status


Branch Unit Tests Functional Tests
master Build status Build status
shipped Build status Build status

What is VFS for Git?

VFS stands for Virtual File System. VFS for Git virtualizes the file system beneath your git repo so that git and all tools see what appears to be a normal repo, but VFS for Git only downloads objects as they are needed. VFS for Git also manages the files that git will consider, to ensure that git operations like status, checkout, etc., can be as quick as possible because they will only consider the files that the user has accessed, not all files in the repo.

New name

This project was formerly known as GVFS (Git Virtual File System). It is undergoing a rename to VFS for Git. While the rename is in progress, the code, protocol, built executables, and releases may still refer to the old GVFS name. See for the latest status of the rename effort.

Installing VFS for Git

Building VFS for Git on Windows

If you'd like to build your own VFS for Git Windows installer:

  • Install Visual Studio 2017 Community Edition or higher (
    • Include the following workloads:
      • .NET desktop development
      • Desktop development with C++
      • .NET Core cross-platform development
    • Include the following additional components:
      • .NET Core runtime
      • Windows 10 SDK (10.0.10240.0)
  • Install the .NET Core 2.1 SDK (
  • Create a folder to clone into, e.g. C:\Repos\VFSForGit
  • Clone this repo into the src subfolder, e.g. C:\Repos\VFSForGit\src
  • Run \src\Scripts\BuildGVFSForWindows.bat
  • You can also build in Visual Studio by opening src\GVFS.sln (do not upgrade any projects) and building. However, the very first build will fail, and the second and subsequent builds will succeed. This is because the build requires a prebuild code generation step. For details, see the build script in the previous step.

The installer can now be found at C:\Repos\VFSForGit\BuildOutput\GVFS.Installer\bin\x64\[Debug|Release]\SetupGVFS.<version>.exe

Building VFS for Git on Mac

Note that VFS for Git on Mac is under active development.

  • Ensure you have Xcode installed, have accepted the terms of use, and have launched Xcode at least once.

  • Install Visual Studio for Mac . (This will also install the dotnet CLI).

  • If you still do not have the dotnet cli >= v2.1.300 installed [manually install it]. You can check what version you have with dotnet --version.(

  • If you're using Xcode for the first time, you may have to login to Xcode with your Apple ID to generate a codesigning certificate. You can do this by launching, opening the PrjFS.xcworkspace and trying to build. You can find the signing options in the General tab of the project's settings.

  • Create a VFSForGit directory and Clone VFSForGit into a directory called src inside it:

    mkdir VFSForGit
    cd VFSForGit
    git clone src
    cd src
  • Prep your machine to use VFS for Git. The following are all done by the script below.

    • install Homebrew
    • install and setup the Git Credential Manager (with brew)
    • install/update Java (with brew)
    • install a VFS for Git aware version of Git
  • From the src directory run

    Scripts/Mac/ [Debug|Release]

    Troubleshooting if this fails

    If you get

    xcodebuild: error: SDK "macosx10.13" cannot be located.

    You may have the "Xcode Command Line Tools" installed (helpfully by Mac OS) instead of full Xcode. Make sure

    xcode-select -p

    shows /Applications/ If it does not, install Xcode and then launch it (you can close it afterwards.)

  • In order to build VFS for Git on Mac (and PrjFSKext) you will have to disable the SIP (System Integrity Protection) in order to load the kext).

    This is dangerous and very bad for the security of your machine. Do not do this on any production machine! If you no longer need to develop VFS for Git on Mac we recommend re-enabling SIP ASAP.

    To disable SIP boot into recovery mode ([Win/⌘] + R while booting your Mac). Once booted into recovery mode open Utilities -> Terminal to launch a terminal. Enter:

    csrutil disable
    # use "csrutil enable" to re-enable when you no longer need to build VFS for Git on Mac

    Then click the Apple logo in the top left and restart.

  • Now you have to load the ProjFS Kext.

    ProjFS.Mac/Scripts/ [Debug|Release]
  • Add your built VFS for Git executable (gvfs) program to your path. A simple way to do that is by adding

    <Path to>/VFSForGit/Publish

    to your PATH.

    Confirm you have it by running

    command -v gvfs

    You should see a path to the gvfs executable.

  • Try cloning a VFS for Git enabled repository!

    gvfs clone URL_TO_REPOSITORY --local-cache-path ~/.gvfsCache

    Note the current use of --local-cache-path. Without this argument VFS for Git will encounter a permissions error when it attempts to create its cache at the root of your hard-drive. Automatic picking of the cache path has not yet been ported to VFS for Git on Mac.

Trying out VFS for Git

  • VFS for Git will work with any git service that supports the GVFS protocol. For example, you can create a repo in Azure DevOps (, and push some contents to it. There are two constraints:
    • Your repo must not enable any clean/smudge filters
    • Your repo must have a .gitattributes file in the root that includes the line * -text
  • gvfs clone <URL of repo you just created>
    • Please choose the Clone with HTTPS option in the Clone Repository dialog in Azure Repos, not Clone with SSH.
  • cd <root>\src
  • Run git commands as you normally would
  • gvfs unmount when done


The VFS for Git source code in this repo is available under the MIT license. See

VFS for Git relies on the PrjFlt filter driver, formerly known as the GvFlt filter driver, available as a prerelease NuGet package.