• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

VFS-for-Git: GVFS 全称是 Git Virtual File System. GVFS 对 git 仓库存储文件系统进 ...

原作者: [db:作者] 来自: Gitee 收藏 邀请

VFS for Git

BranchUnit TestsFunctional TestsLarge Repo PerfLarge Repo Build
masterBuild statusBuild statusBuild statusBuild status
shippedBuild statusBuild statusBuild statusBuild status

What is VFS for Git?

VFS stands for Virtual File System. VFS for Git virtualizes the file systembeneath your Git repository so that Git and all tools see what appears to be aregular working directory, but VFS for Git only downloads objects as theyare needed. VFS for Git also manages the files that Git will consider, toensure that Git operations such as status, checkout, etc., can be as quickas possible because they will only consider the files that the user hasaccessed, not all files in the repository.

Note: for new deployments, we strongly recommend you considerScalar instead of VFS for Git. Bycombining the lessons from operating VFS for Git at scale with new developmentsin Git, Scalar offers a clearer path forward for all large monorepos.

Installing VFS for Git

VFS for Git requires Windows 10 Anniversary Update (Windows 10 version 1607) or later.

To install, use winget to install themicrosoft/git fork of Git and VFS for Gitusing:

winget install --id Microsoft.Gitwinget install --id Microsoft.VFSforGit

You will need to continue using the microsoft/git version of Git, and itwill notify you when new versions are available.

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
      • Windows 10 SDK (10.0.10240.0)
  • Install the .NET Core 2.1 SDK (https://www.microsoft.com/net/download/dotnet-core/2.1)
  • Install nuget.exe
  • 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 firstbuild 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.

You can also use Visual Studio 2019. There are a couple of options for getting all the dependencies.

  • You can install Visual Studio 2017 side by side with Visual Studio 2019, and make sure that you have all the dependencies from Visual Studio 2017 installed
  • Alternatively, if you only want to have Visual Studio 2019 installed, install the following extra dependencies:

Visual Studio 2019 will automatically prompt you to install these dependencies when you open the solution. The .vsconfig file that is present in the root of the repository specifies all required components except the Windows 10 SDK (10.0.10240.0) as this component is no longer shipped with VS2019 - you'll still need to install that separately.

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

Trying out VFS for Git

  • VFS for Git requires a Git service that supports theGVFS protocol. For example, you can create a repo inAzure DevOps, and pushsome 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

Note on naming

This project was formerly known as GVFS (Git Virtual File System). You may occasionallysee collateral, including code and protocol names, which refer to the previous name.

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 GvFltfilter driver, available as a prerelease NuGet package.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap