Virtual File System for Git: Enable Git at Enterprise Scale
C# C++ Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Readme.md

VFS for Git

Windows

Branch Unit Tests Functional Tests
master Build status Build status

Mac

Branch Unit Tests Functional Tests
master 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 https://github.com/Microsoft/VFSForGit/projects/4 for the latest status of the rename effort.

Installing VFS for Git

Building VFS for Git

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

  • Install Visual Studio 2017 Community Edition or higher (https://www.visualstudio.com/downloads/).
    • Include the following workloads:
      • .NET desktop development
      • Desktop development with C++
      • .NET Core cross-platform development
    • Include the following additional components:
      • .NET Core runtime
      • C++/CLI support
      • Windows 10 SDK (10.0.10240.0)
  • Install the .NET Core 2.1 SDK (https://www.microsoft.com/net/download/dotnet-core/2.1)
  • 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

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 Visual Studio Team Services (https://www.visualstudio.com/team-services/), 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>
  • cd <root>\src
  • Run git commands as you normally would
  • gvfs unmount when done

Licenses

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

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