Adjusting git hooks for gitlfs

This commit is contained in:
Jeffrey Garretson
2021-12-20 15:27:37 -07:00
parent dd5468aceb
commit eabdfa8c37
4 changed files with 18 additions and 0 deletions

View File

@@ -2,3 +2,7 @@
#
touch CMakeLists.txt
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 "$@"

View File

@@ -2,3 +2,7 @@
#
touch CMakeLists.txt
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-commit.\n"; exit 2; }
git lfs post-commit "$@"

View File

@@ -2,3 +2,7 @@
#
touch CMakeLists.txt
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-merge.\n"; exit 2; }
git lfs post-merge "$@"

6
gitHookScripts/pre-push Normal file
View File

@@ -0,0 +1,6 @@
#!/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/pre-push.\n"; exit 2; }
git lfs pre-push "$@"