4

git-lfs使用安装homebrew,它在命令行中运行良好。我仍然可以在 Xcode 中添加文本文件,但是每当我尝试在 Xcode 中添加应该由 跟踪的文件时,git-lfs都没有效果(文件在 Xcode 的文件列表中保持“?实际上没有添加文件)。经过一番研究,我尝试添加~/Library/LaunchAgents/my.startup.plistsetenv PATH /usr/local/bin但没有效果。

我怎样才能让 Xcode 玩得很好git-lfs

4

2 回答 2

5

在 Xcode 中使用 git-lfs 似乎有问题。见这篇文章: http: //gopalkri.com/2016/05/17/git-lfs-xcode-asset-catalogs/

坚持使用 Git 提交更改而不是通过 Xcode 进行更改可能会更好。

于 2016-11-20T20:25:32.150 回答
0

我们有一个类似的问题,我们的 CI 使用 Xcode 的 git 而不是自制的。所以我们需要让 git-lfs 在 Xcode 中工作。这被证明非常简单:将 git-lfs 核心文件从自制版本复制到 Xcode 中(每次升级 Xcode 时都需要再次执行此操作):

sudo cp /usr/local/Cellar/git/2.28.0/libexec/git-core/git-lfs /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-lfs

请注意,您的 git-core 源文件夹可能位于其他位置/usr/local/Cellar/git/2.28.0/libexec/git-core- 您可以使用locate或其他搜索命令来找到它。

于 2021-04-28T10:24:40.393 回答