Files
nexus/wiki/concepts/Obsidian-Git.md
2026-05-03 05:42:12 +08:00

40 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Obsidian Git"
type: concept
tags: [tool, obsidian, version-control, git]
sources: [karpathy-最新分享-用-llm-搭建个人知识库-告别-rag-的低效循环]
last_updated: 2026-04-20
---
## Aliases
- Obsidian Git 插件
- Obsidian Git 扩展
## Definition
Obsidian 的社区插件,为 Vault 提供 Git 版本管理功能,支持自动 commit + push 到远程仓库。是 LLM Wiki 的**必选项**——AI 批量改文件的能力越强,越需要版本管理来兜底。
## Setup Steps
1. 设置 → 第三方插件 → 社区插件市场 → 搜索 "git" → 安装并启用
2. 如果 Vault 还不是 Git 仓库:
```bash
git init
git remote add origin https://github.com/用户名/knowledge-bases.git
git branch -M main
git add .
git commit -m "init: 初始化知识库"
git push -u origin main
```
3. 在 Obsidian Git 插件设置中,将 **Auto commit-and-sync interval** 设为 10 分钟
## Value for LLM Wiki
- **实时备份 + 完整历史**:每隔几分钟插件自动 commit + push完全无需手动操作
- **版本兜底**AI 批量修改多个文件时,可随时回滚到任意历史版本
- **多设备同步**:通过 GitHub 实现跨设备同步
## Note
建议创建**私有仓库**Private Repository知识库内容属于私人数据。
## Connections
- [[Obsidian Git]] ← 版本管理 ← [[LLM Wiki]]
- [[Obsidian Git]] ← 插件 → [[Obsidian]]