lean-flt / scripts /install_pre-push.sh
cfahlgren1's picture
cfahlgren1 HF Staff
mirror at 019805815d7da565ed1e9f427b6fbd0cbc9d00d3
ae5bbef verified
Raw History Blame Contribute Delete
375 Bytes
#!/usr/bin/env bash
# Rename the pre-push sample file if it exists
if [ -f ".git/hooks/pre-push.sample" ]; then
mv .git/hooks/pre-push.sample .git/hooks/pre-push
fi
# Copy the content of scripts/pre-push into .git/hooks/pre-push
cp scripts/pre-push.sh .git/hooks/pre-push
# Make the pre-push hook executable
chmod +x .git/hooks/pre-push
echo "Pre-push hook installed."