From ad2f12c16e73c6f6c4866a0d5ca8a92d1f079c06 Mon Sep 17 00:00:00 2001 From: MajorLinux Date: Thu, 30 Apr 2026 05:30:45 -0400 Subject: [PATCH] wiki: document wiki-commit wrapper + pre-commit hook setup Adds a 'One-liner wrapper' tip and a 'Pre-Commit Hook (in repo)' section to MajorWiki-Deploy-Status.md describing the per-clone setup needed on each workstation: git config core.hooksPath .githooks git config pull.rebase true Co-Authored-By: Claude Opus 4.7 (1M context) --- MajorWiki-Deploy-Status.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/MajorWiki-Deploy-Status.md b/MajorWiki-Deploy-Status.md index 0f9c2b4..79fade2 100644 --- a/MajorWiki-Deploy-Status.md +++ b/MajorWiki-Deploy-Status.md @@ -79,6 +79,23 @@ git push Gitea receives the push → fires webhook → majorlab pulls → MkDocs rebuilds → `notes.majorshouse.com` updates automatically. +> [!tip] One-liner wrapper +> On MajorRig, the `~/bin/wiki-commit "msg"` helper runs `git pull --rebase --autostash` → `git add -A` → `git commit` → `git push` in one shot. Sidesteps fast-forward rejections from cowork pushes (e.g. MajorAir pushing in parallel) and the empty-credentials issue with HTTPS. + +## 🔒 Pre-Commit Hook (in repo) + +`.githooks/pre-commit` (tracked) blocks any commit that adds or renames a `*.md` article without a corresponding entry in `SUMMARY.md`. Bypass with `git commit --no-verify` if you genuinely need to. + +**Per-clone setup** (one-time, per workstation that uses the repo): + +```bash +cd +git config core.hooksPath .githooks +git config pull.rebase true +``` + +The hooksPath line is required — git doesn't run hooks from a tracked directory by default. The `pull.rebase true` makes plain `git pull` always rebase locally, matching the `wiki-commit` wrapper's behavior. + ## 📋 Wiki Maintenance Protocol Every time a new article is added, the following **MUST** be updated to maintain index integrity: