diff --git a/.githooks/pre-commit.d/50-check-format b/.githooks/pre-commit.d/50-check-format
index 5995aa6ea4..e50e8a5eaf 100755
--- a/.githooks/pre-commit.d/50-check-format
+++ b/.githooks/pre-commit.d/50-check-format
@@ -7,10 +7,24 @@
 # Based on clang-format pre-commit hook by Alex Eagle
 # https://gist.github.com/alexeagle/c8ed91b14a407342d9a8e112b5ac7dab
 
-# Set KICAD_CHECK_FORMAT to allow this hook to run
-# if not set, the hook always succeeds.
-if [ -z "$KICAD_CHECK_FORMAT" ]; then
-    exit 0
+# Set kicad.check-format to allow this hook to run
+# If not set, the hook always succeeds.
+
+do_format=false
+
+# Check if formatting is configured
+if [ "$(git config --get kicad.check-format)" = true ]; then
+    do_format=true
+fi
+
+# Older env variable method
+if [ ! -z "$KICAD_CHECK_FORMAT" ]; then
+    do_format=true
+fi
+
+if [ ! ${do_format} = true ]; then
+    # No formatting required
+    exit 0;
 fi
 
 check_clang_format() {
diff --git a/Documentation/development/coding-style-policy.md b/Documentation/development/coding-style-policy.md
index a4da373637..8836f6a27e 100644
--- a/Documentation/development/coding-style-policy.md
+++ b/Documentation/development/coding-style-policy.md
@@ -70,9 +70,13 @@ Set the `git clang-format` tool to use the provided `_clang-format` file:
 
     git config clangFormat.style file
 
-Then, to enable the format checker, set the `KICAD_CHECK_FORMAT` environment
-variable in your shell. Without this variable, the format checker will not
-run on commit, but you can still check files staged for commit manually:
+Then, to enable the format checker, set the `kicad.check-format` Git config
+to "true" for the KiCad repo:
+
+    git config kicad.check-format true
+
+Without this config, the format checker will not run on commit, but you can
+still check files staged for commit manually:
 
     tools/check_coding.sh --diff