From 74d282217c015197a63d65b292b59f5308137210 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Fri, 19 Nov 2021 12:01:00 +0100 Subject: [PATCH] bin: add script to install pre-commit uncowardly --- .local/bin/scripts/pre-commit-install | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 .local/bin/scripts/pre-commit-install diff --git a/.local/bin/scripts/pre-commit-install b/.local/bin/scripts/pre-commit-install new file mode 100755 index 0000000..abab893 --- /dev/null +++ b/.local/bin/scripts/pre-commit-install @@ -0,0 +1,6 @@ +#!/bin/sh +# Install pre-commit, ignoring globally set core.hooksPath +git config --unset core.hooksPath +GIT_CONFIG_GLOBAL=/dev/null pre-commit install +GIT_CONFIG_GLOBAL=/dev/null pre-commit install -t pre-push +git config --add core.hooksPath .git/hooks