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: