install git lfs

This commit is contained in:
Christoph J. Scherr 2025-01-12 18:08:25 +01:00
parent 1ed1614b70
commit 02dd9c13be
5 changed files with 18 additions and 1 deletions

3
.githooks/post-checkout Executable file
View File

@ -0,0 +1,3 @@
#!/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 "$@"

3
.githooks/post-commit Executable file
View File

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

3
.githooks/post-merge Executable file
View File

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

View File

@ -1,5 +1,5 @@
#!/bin/bash
# check for WIP commits
wips=$(git log --oneline --no-decorate | grep -i wip )
wips_n=$(echo "$wips" | wc -l)
LOCKFILE=/tmp/githook.allow_wip
@ -14,3 +14,7 @@ if [[ ! -f $LOCKFILE && -n "$wips" ]]; then
* ) echo -e "\naborting."; exit 1;;
esac
fi
# git-lfs stuff
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 "$@"

4
.gitignore vendored
View File

@ -15,6 +15,10 @@
!.config/btop/**
!.config/kitty
!.config/kitty/**
!.config/zed
!.config/zed/**
!.githooks
!.githooks/**
!.config/rustfmt/**
!.config/rustfmt/
!.gitignore