
她用曾经自己渴望的方式 去爱他
前几天,Anthropic 官方发布了 Claude Code 桌面版,让calude code的普及更加平民化了。


✅ 优点:轻量、快、黑客感拉满 ❌ 缺点:
下载地址:https://claude.com/download

✅ 新增三大核心能力:
你以为“多会话”只是开了 N 个 Terminal?
错。Claude Desktop 用 git worktree add 实现了真正的「空间折叠」:
ounter(lineounter(lineounter(lineounter(lineounter(line
~/.claude-worktrees/
├── session-fix-nil-slice/ ← worktree #1 → branch: fix/slice-bug
├── session-add-cache-layer/ ← worktree #2 → branch: feat/cache
├── session-refactor-utils/ ← worktree #3 → branch: refactor/utils
└── main/ ← 原始 repo(只读参考)需要注意的是:
当 Claude Code 创建工作树时,通过 .gitignore 忽略的文件不会自动可用。
需要在仓库根目录创建 .worktreeinclude 文件可以解决这个问题,该文件指定哪些被忽略的文件应复制到新的工作树。

在这里插入图片描述
git clone?方案 | 磁盘占用 | 启动速度 | 隔离性 | 同步便捷 |
|---|---|---|---|---|
git clone | ❌ 3× repo size | ❌ 慢(全 clone) | ✅ 高 | ❌ 需 git pull |
git worktree | ✅ +几百 KB | ✅ 秒开 | ✅ 高 | ✅ 共享 .git |
🔬 原理图解:
ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line
┌──────────────┐
│ Main Repo │ ← .git/objects(所有 commit/data 共享)
└──────┬───────┘
│
┌────────────┼────────────┐
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│Session 1│ │Session 2│ │Session 3│ ← 各自有 working tree(文件副本)
│fix/xxx │ │feat/yyy │ │refactor/│
└─────────┘ └─────────┘ └─────────┘
独立修改 → 互不干扰 → merge 时才见面 👋💡 小技巧:在项目根放
.worktreeinclude文件,就能让.env、secrets.json也复制进 worktree(默认.gitignore的文件会被跳过)!
从 CLI 到 GUI,不是倒退,而是心智成本的持续下降:
slices.Concat 优化性能 → 你少写 10 行 benchmark我们正在见证: 「结对编程」从人类 ↔ 人类, 进化成人类 ↔ 有 Git 良知的 AI。