git - Visual Studio、TFS 和 Git LFS:如何设置远程存储?
问题描述
来自微软文档:
Git LFS 是 Git 的扩展,它将描述大文件的数据提交到你的 repo,并将二进制文件内容存储到单独的远程存储中。
这听起来不错,但是我找不到任何地方可以设置远程存储?对我们来说,重点是不要使用与 TFS 服务器相同的驱动器来存储二进制文件,这对于 Git-LFS 似乎是可行的。我对 Git 很陌生,我们想从 TFSVC 迁移到 Git,但其余部分保留 TFS。
解决方案
您可以查看以下文档:
默认情况下,Git Large File Storage 客户端将大型资产存储在托管 Git 存储库的同一台服务器上。但是您可以将 Git 大文件存储配置为使用第三方服务器。尝试创建一个指向第三方服务器的 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
推荐阅读
- sql-server - 如何使用 Active Directory 向 Cloud SQL Server 进行身份验证
- java - 如何在drone.io上使用python和java?
- sql - 如何在 PostgreSQL 的 DROP/CREATE/INSERT 语句中简洁地使用 SET 变量?
- c++ - 为什么我的循环没有返回正确的答案?
- flutter - 如何知道列表视图是否可以以编程方式滚动
- python - 从特定字节读取二进制文件
- nomad - 游牧作业部署问题(raw_exec 模式,v1.0.1)
- sql - 今天在 Oracle Unix 日期
- python - 如何使用来自另一个 DataFrame 的单个值创建 Pandas DataFrame?
- python - 使用正则表达式清理列根据条件删除字符