Skip to content

Commit fa4e67e

Browse files
Josh Wilhelmiclaude
andcommitted
[gobby-cli-#907] chore: untrack gobby-wiki vault on main; publish via pre-push
Mirror of the dev untrack: blanket-ignore gobby-wiki/, add .githooks/pre-push, drop 595 tracked vault files. Working copies preserved; vault lives on origin/wiki. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0cddb76 commit fa4e67e

597 files changed

Lines changed: 47 additions & 42844 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.githooks/pre-push

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/sh
2+
# Publish the codewiki vault to the `wiki` branch whenever `main` is pushed.
3+
#
4+
# The vault lives at gobby-wiki/ (gitignored on dev/main) and is checked out as a
5+
# sibling worktree on the `wiki` branch. This hook mirrors the working copy into
6+
# that worktree, commits, and pushes origin/wiki. It is best-effort: any failure
7+
# is reported but never blocks the push to main (exit 0).
8+
#
9+
# One-time setup per clone:
10+
# git config core.hooksPath .githooks
11+
# git worktree add ../gobby-cli-wiki wiki # the publish target
12+
set -u
13+
14+
repo_root=$(git rev-parse --show-toplevel) || exit 0
15+
wt="$repo_root/../gobby-cli-wiki"
16+
17+
publish() {
18+
if [ ! -e "$wt/.git" ]; then
19+
echo "pre-push: wiki worktree not found at $wt — skipping vault publish" >&2
20+
echo "pre-push: create it with 'git worktree add $wt wiki'" >&2
21+
return 0
22+
fi
23+
if [ ! -d "$repo_root/gobby-wiki" ]; then
24+
echo "pre-push: no gobby-wiki/ to publish — skipping" >&2
25+
return 0
26+
fi
27+
rsync -a --delete --exclude '.git' "$repo_root/gobby-wiki/" "$wt/gobby-wiki/" || return 0
28+
git -C "$wt" add -A
29+
if git -C "$wt" diff --cached --quiet; then
30+
echo "pre-push: vault unchanged — nothing to publish" >&2
31+
return 0
32+
fi
33+
git -C "$wt" commit -q -m "vault: sync from $(git -C "$repo_root" rev-parse --short HEAD)"
34+
git -C "$wt" push -q origin HEAD:wiki || echo "pre-push: vault publish push failed (non-fatal)" >&2
35+
}
36+
37+
# stdin: <local_ref> <local_sha> <remote_ref> <remote_sha> per ref being pushed
38+
while read -r local_ref local_sha remote_ref remote_sha; do
39+
case "$remote_ref" in
40+
refs/heads/main) publish ;;
41+
esac
42+
done
43+
44+
exit 0

.gitignore

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,7 @@
1313
!.gobby/plans/coverage/
1414
!.gobby/plans/coverage/**
1515
!.gobby/plans/gwiki-parity-plus.md
16-
gobby-wiki/_meta/**
17-
gobby-wiki/**/*.lock
18-
19-
# Obsidian vault config: ignore personal/local state by default.
20-
gobby-wiki/.obsidian/*
21-
!gobby-wiki/.obsidian/
22-
!gobby-wiki/.obsidian/app.json
23-
!gobby-wiki/.obsidian/appearance.json
24-
!gobby-wiki/.obsidian/core-plugins.json
25-
!gobby-wiki/.obsidian/hotkeys.json
26-
!gobby-wiki/.obsidian/snippets/
27-
!gobby-wiki/.obsidian/snippets/**
16+
# Codewiki vault lives on the `wiki` branch (republished by .githooks/pre-push on
17+
# pushes to main); kept untracked here so it stays out of dev/main everyday diffs.
18+
gobby-wiki/
2819
.playwright/

gobby-wiki/.obsidian/app.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

gobby-wiki/.obsidian/appearance.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

gobby-wiki/.obsidian/core-plugins.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

gobby-wiki/_gwiki/scope.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

gobby-wiki/_index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

gobby-wiki/code/INDEX.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

gobby-wiki/code/_architecture.md

Lines changed: 0 additions & 116 deletions
This file was deleted.

gobby-wiki/code/_changes.md

Lines changed: 0 additions & 5591 deletions
This file was deleted.

0 commit comments

Comments
 (0)