Visual Studio、TFS和Git LFS:如何设置远程存储?

问题描述 投票:0回答:1

微软文档:

Git LFS是Git的一个扩展,它可以将提交中描述大文件的数据提交到你的repo中,并将二进制文件内容存储到单独的远程存储中。

这听起来不错,但我找不到任何地方可以设置远程存储。对我们来说,整个要点就是不要和我们的 TFS 服务器使用同一个驱动器来存储二进制文件,这在 Git-LFS 中似乎是可行的。我对Git很陌生,我们想把TFSVC移到Git上,但其他部分保留TFS。

git visual-studio tfs windows-10 git-lfs
1个回答
1
投票

你可以查看下面的文档。

https:/help.github.comenenterprise2.20admininstallationconfiguring-git-large-file-storag-to-use-a-thirdparty-server。

默认情况下,Git Large File Storage 客户端将大型资产存储在托管 Git 仓库的同一台服务器上,但您可以将 Git Large File Storage 配置为使用第三方服务器。但你可以配置Git Large File Storage使用第三方服务器。尝试创建一个指向第三方服务器的Git LFS配置文件。

# Show default configuration
$ git lfs env
> git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
> git version 2.7.4 (Apple Git-66)

> Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic)

# Create .lfsconfig that points to third party server.
$ git config -f .lfsconfig remote.origin.lfsurl https://THIRD-PARTY-LFS-SERVER/path/to/repo
$ git lfs env
> git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
> git version 2.7.4 (Apple Git-66)

> Endpoint=https://THIRD-PARTY-LFS-SERVER/path/to/repo/info/lfs (auth=none)

# Show the contents of .lfsconfig
$ cat .lfsconfig
[remote "origin"]
lfsurl = https://THIRD-PARTY-LFS-SERVER/path/to/repo
© www.soinside.com 2019 - 2024. All rights reserved.