Posts

Post not yet marked as solved
0 Replies
1.9k Views
I am trying out the use of Git LFS with a repository for an iOS app. Everything is fine except when I try to use Git through Xcode or with an Xcode Bot.With the Xcdoe 9.2 IDE, I do the following:Switch to the Source Control navigator (⌘2)Right-click on the branch with the large file referencesClick Checkout...After the checkout process completes, the large files are not applied. Instead, I get the referencing files, such as the following:version https://git-lfs.github.com/spec/v1 oid sha256:d2c5ffeaaf53d92e57dacca17e83259bea0d53c841520f3138cc79415a3d89c8 size 3364784This is not a path problem as far as I can tell. I've tried updating the PATH environment variable for launchd (via a plist in ~/Library/LaunchAgents and rebooting). That correclty extends the search path so that git-lfs should be found (verified with launctl getenv PATH). I also tried putting the git-lfs executable in /Applications/Xcode.app/Contents/Developer/usr/bin, but the result is the same.It really seems like the way that Xcode is using Git to check out the branch is not executing the post-checkout hook. The hooks are all what seem to be the standard for Git LFS. For example, here is post-checout:#!/bin/sh command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; } git lfs post-checkout "$@"Is there anything about Xcode's use of Git that would skip the hooks? If so, is there a way to make those hooks get executed?
Posted
by pfh.
Last updated
.