--- date: 2026-07-06 tags: [hermes, gitlab, forgejo, obsidian, setup] --- # GitLab/Forgejo-Obsidian-Doku-Guide ## Ziel Diesen Wissensstand reproduzieren: Markdown-Dokumentation in einem Forgejo-Repository versionieren und mit Obsidian synchronisieren. ## Schritt 1: Repository klonen ```bash # Repository clonen $ git clone https://git.consoro.it/barby/hermes-erkenntnisse.git ~/Studio/hermes-erkenntnisse-git $ cd ~/Studio/hermes-erkenntnisse-git $ git remote -v origin https://git.consoro.it/barby/hermes-erkenntnisse.git (fetch) origin https://git.consoro.it/barby/hermes-erkenntnisse.git (push) ``` ## Schritt 2: Obsidian-Symlink setzen ```bash # Obsidian-Vault-Verzeichnis $ OBSIDIAN_VAULT="$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/hermes-infra" $ mkdir -p "$OBSIDIAN_VAULT" # Symlink vom Git-Repo in den Vault $ ln -s "$HOME/Studio/hermes-erkenntnisse-git" "$OBSIDIAN_VAULT/hermes-erkenntnisse" # Verifikation $ ls -la "$OBSIDIAN_VAULT/" lrwxr-xr-x hermes-erkenntnisse -> /Users/matthiaskoerner/Studio/hermes-erkenntnisse-git ``` ## Schritt 3: Git-Konfiguration ```bash $ git config user.name "Barby" $ git config user.email "barby@consoro.it" # Optional: Credential-Helper für HTTPS $ git config credential.helper osxkeychain ``` ## Schritt 4: Erste Datei erstellen und pushen ```bash $ echo "# Test" > test.md $ git add test.md $ git commit -m "docs: initial commit" $ git push origin main ``` ## Schritt 5: Skripte ### `sync-hermes-docs.sh` ```bash #!/bin/bash # Sync: Git-Repo → Forgejo cd ~/Studio/hermes-erkenntnisse-git || exit 1 git add -A git commit -m "docs: auto-sync $(date +%Y-%m-%d_%H:%M)" || true git pull --rebase origin main git push origin main echo "Sync completed: $(date)" ``` ### `watch-and-sync.sh` ```bash #!/bin/bash # Watch-Modus: automatischer Sync bei Dateiänderungen fswatch -o ~/Studio/hermes-erkenntnisse-git | while read; do sleep 2 # Debounce ~/Studio/hermes-erkenntnisse-git/sync-hermes-docs.sh done ``` ```bash $ chmod +x sync-hermes-docs.sh watch-and-sync.sh ``` ## Schritt 6: Cron-Job (optional) ```bash # Alle 30 Minuten automatisch syncen $ crontab -e # Füge hinzu: */30 * * * * $HOME/Studio/hermes-erkenntnisse-git/sync-hermes-docs.sh >> $HOME/Studio/hermes-erkenntnisse-git/sync.log 2>&1 ``` ## Ordnerstruktur (final) ``` ~/Studio/hermes-erkenntnisse-git/ ├── .git/ ├── README.md ├── skills-rekursion-bug.md ├── approvals-mode-mechanismus.md ├── hub-disk-vollanalyse.md ├── barby-gateway-deaktivierung.md ├── lokale-modelle-mac.md ├── pil-fehler-comfyui.md ├── hermes-gateway-konfiguration.md ├── gitlab-obsidian-doku-guide.md ├── sync-hermes-docs.sh └── watch-and-sync.sh ``` ## §§ WICHTIG - Obsidian-Vault-Pfad variiert je nach iCloud-Status. Prüfen mit: `ls "$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/"` - Bei Verwendung von **Git** statt Forgejo: Remote-URL auf `git@git.consoro.it:barby/hermes-erkenntnisse.git` ändern - `fswatch` installieren: `brew install fswatch` - Credentials werden im macOS Keychain gespeichert — kein Passwort im Skript