From 1fe6fc2b0c5cabf21c241f9a033e4d53dd475316 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 7 May 2026 09:10:15 -1000 Subject: chore: add pre-commit hook blocking commits to master Installs scripts/git-hooks/pre-commit which hard-blocks any commit attempted from the master branch. Activate with: git config core.hooksPath scripts/git-hooks Co-Authored-By: Claude Sonnet 4.6 --- .agent/config.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.agent') diff --git a/.agent/config.md b/.agent/config.md index d0e00d1..52d135d 100644 --- a/.agent/config.md +++ b/.agent/config.md @@ -19,9 +19,12 @@ This is the primary source of truth for all AI agents working on **Nav**. These **Before any other action in every session: run `git branch` and switch to `main` if not already there.** ``` -git checkout main # run this if not already on main +git checkout main # run this if not already on main +git config core.hooksPath scripts/git-hooks # activate if not already set ``` +The repo ships a pre-commit hook in `scripts/git-hooks/pre-commit` that hard-blocks commits to `master`. Activate it with the command above on first use in any environment. + **Primary branch: `main`** - ALL work merges to `main`. Never to `master` or any other branch. -- cgit v1.2.3