Skip to content

Commit 436e10d

Browse files
committed
Update README with setup wizard documentation
1 parent 37ed086 commit 436e10d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ An Obsidian plugin that automatically commits vault changes to git.
66

77
## Features
88

9+
- **Setup Wizard**: Guides new users through repository setup based on current state
910
- **Auto Commit**: Automatically commit changes after file modifications (with debounce)
1011
- **Auto Pull**: Optionally pull from remote when Obsidian opens
1112
- **Auto Push**: Optionally push to remote after commit
@@ -71,6 +72,18 @@ Then copy `main.js`, `manifest.json`, and `styles.css` to your vault's plugin fo
7172
| Git binary path | Path to git executable | `git` |
7273
| Ignore .obsidian directory | Exclude config folder from triggers | On |
7374

75+
### Setup (for new users)
76+
77+
The plugin detects your repository state and shows relevant options:
78+
79+
| State | Description | Options |
80+
|-------|-------------|---------|
81+
| Not a repo | Vault is not a git repository | Connect to remote / Create new repo / Local only |
82+
| Empty repo | Git initialized but no commits | Connect to remote / Create new repo |
83+
| Local only | Has commits but no remote | Add remote and push |
84+
| No upstream | Remote configured but no upstream branch | Set upstream |
85+
| Ready | Fully configured | (Setup section hidden) |
86+
7487
### Repository
7588

7689
- **Pull**: Pull from remote repository

README_zh.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
## 功能
88

9+
- **设置向导**:根据当前仓库状态引导新用户完成配置
910
- **自动提交**:文件修改后自动提交(带防抖)
1011
- **自动拉取**:可选在 Obsidian 启动时从远程拉取
1112
- **自动推送**:可选在提交后自动推送到远程
@@ -71,6 +72,18 @@ npm run build
7172
| Git 可执行文件路径 | git 的路径 | `git` |
7273
| 忽略配置目录 | 排除配置文件夹触发自动提交 | 开启 |
7374

75+
### 初始设置(新用户)
76+
77+
插件会检测仓库状态并显示相应选项:
78+
79+
| 状态 | 描述 | 可选操作 |
80+
|------|------|----------|
81+
| 非 Git 仓库 | Vault 尚未初始化为 Git 仓库 | 连接远程 / 创建新仓库 / 仅本地 |
82+
| 空仓库 | 已初始化但无提交 | 连接远程 / 创建新仓库 |
83+
| 仅本地 | 有提交但无远程 | 添加远程并推送 |
84+
| 无上游 | 已配置远程但无上游分支 | 设置上游 |
85+
| 就绪 | 配置完成 | (设置部分隐藏) |
86+
7487
### 仓库
7588

7689
- **拉取**:从远程仓库拉取

0 commit comments

Comments
 (0)