Created
January 15, 2021 20:39
-
-
Save dannyow/30ceed9c11404101b96b6cbf3e6fc030 to your computer and use it in GitHub Desktop.
post-checkout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Fix on Xcode problem with git-lfs | |
# Simply skip the git-lfs check if there is GIT_EXEC_PATH /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core | |
if [ -z "$GIT_EXEC_PATH" ] | |
then | |
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 "$@" | |
else | |
echo >&2 "\n⚠️ Skipping git-lfs since it looks like hook is run for git from Xcode..." | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment