Phase 0-2: Schema cleanup, typed relations, event-driven automation
- Phase 0: AGENTS.md cleanup (dedup quotes, renumber sections, merge qmd) - Phase 1: typed relations (manage-relations.py, graph-search.py, check-staleness.py, detect-conflicts.py) - Phase 2: frontmatter validator, weekly lint, knowledge promotion, git hooks - Fix .gitignore to track tools/ and .githooks/ - Fix git remote URL (remove plaintext token) - New wiki pages: 504 pages, 34 raw sources
This commit is contained in:
+83
@@ -0,0 +1,83 @@
|
||||
---
|
||||
categories:
|
||||
- "[[LLM Wiki]]"
|
||||
tags:
|
||||
- wiki
|
||||
- tool
|
||||
- version-control
|
||||
created: 2026-04-08
|
||||
source: "[[Obsidian-Git多端同步指南]]"
|
||||
type: tool
|
||||
aliases:
|
||||
- Git版本控制
|
||||
- 版本控制
|
||||
---
|
||||
|
||||
# Git
|
||||
|
||||
> **一句话定义**:分布式版本控制系统,是现代软件开发和知识管理的基础设施。
|
||||
|
||||
## 基本信息
|
||||
|
||||
| 属性 | 值 |
|
||||
|------|-----|
|
||||
| 创始人 | Linus Torvalds |
|
||||
| 首次发布 | 2005 年 |
|
||||
| 许可证 | GPL v2 |
|
||||
| 官网 | <https://git-scm.com> |
|
||||
|
||||
## 在 LLM Wiki 中的角色
|
||||
|
||||
### 1. 多端同步
|
||||
|
||||
Git 是实现 Obsidian 多端同步的核心工具:
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
A[本地仓库] -->|push| B[Gitea 服务器]
|
||||
B -->|pull| C[另一台设备]
|
||||
|
||||
subgraph 同步策略
|
||||
D[坚果云] -.-> A
|
||||
E[本地磁盘] -.-> A
|
||||
end
|
||||
```
|
||||
|
||||
### 2. 分支策略
|
||||
|
||||
在 Wiki 环境中,常用分支策略:
|
||||
|
||||
| 分支 | 用途 |
|
||||
|------|------|
|
||||
| `main` | 用户手动编辑的内容 |
|
||||
| `openclaw` | AI Agent 自动生成/编辑的内容 |
|
||||
|
||||
### 3. Git LFS
|
||||
|
||||
对于大文件(图片、PDF 等),使用 Git LFS 管理:
|
||||
|
||||
```bash
|
||||
# 安装 LFS
|
||||
git lfs install
|
||||
|
||||
# 跟踪大文件
|
||||
git lfs track "*.pdf"
|
||||
git lfs track "*.png"
|
||||
```
|
||||
|
||||
## 与 Obsidian 的集成
|
||||
|
||||
Obsidian 可以通过以下插件与 Git 集成:
|
||||
|
||||
- **Obsidian Git**:自动提交、推送、拉取
|
||||
- **GitHub Actions**:自动化 CI/CD
|
||||
|
||||
## 相关页面
|
||||
|
||||
- [[Obsidian-Git多端同步]] — 完整的 Obsidian + Git 多端同步指南
|
||||
- [[Gitea]] — 自托管 Git 服务
|
||||
- [[Gitea-部署指南]] — 群晖 NAS + FRP 部署 Gitea
|
||||
|
||||
## 来源
|
||||
|
||||
- [[Obsidian-Git多端同步指南]] — 完整的多端同步文档
|
||||
Reference in New Issue
Block a user