workbuddy.xpcool.com/README.md

62 lines
2.0 KiB
Markdown
Raw Permalink 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.

# workbuddy.xpcool.com 工作空间仓库
xpcool.com 系列项目的**中央工作空间**:统一规则、项目索引与每日日志,用 git 管理以便跨设备同步。
## 这是什么
本仓库不是业务代码,而是 WorkBuddy 工作空间的"大脑"——每次会话自动加载的规则与项目索引都在这:
```
workbuddy.xpcool.com/
├── README.md ← 本文件
└── .workbuddy/memory/
├── MEMORY.md ← 三条铁律 + 项目索引(相对路径)
└── YYYY-MM-DD.md ← 中央每日日志(按天累积)
```
业务代码在各项目自己的仓库admin / service / tool.xpcool.com本仓库只负责**规则与记录**。
## 布局约定(跨设备必须一致)
所有项目与工作空间仓库位于**同一父目录**下:
```
<父目录>/
├── workbuddy.xpcool.com/ ← 本仓库
├── admin.xpcool.com/
├── service.xpcool.com/
└── tool.xpcool.com/
```
换设备 clone 时按此布局摆放,`MEMORY.md` 里的相对路径索引(`../admin.xpcool.com/...`)即可全部生效。
## 跨设备使用流程
**首次在新设备部署:**
```bash
# 1. 建父目录并 clone 各仓库(保持同级布局)
mkdir xpcool && cd xpcool
git clone https://git.xpcool.com/xpcool/workbuddy.xpcool.com.git
git clone https://git.xpcool.com/xpcool/admin.xpcool.com.git
git clone https://git.xpcool.com/xpcool/service.xpcool.com.git
git clone https://git.xpcool.com/xpcool/tool.xpcool.com.git
```
**日常同步(每次工作结束):**
```bash
# 各项目 + 本工作空间分别提交推送
cd <项目> && git add -A && git commit -m "..." && git push
cd ../workbuddy.xpcool.com && git add -A && git commit -m "..." && git push
```
**换设备开工前:**
```bash
cd xpcool && for d in */; do (cd "$d" && git pull); done
```
## 新增项目
1.`git.xpcool.com` 建仓库 `xxx.xpcool.com`
2.`MEMORY.md` 索引表加一行(相对路径 + 远程地址)
3. 在其 `.workbuddy/memory/``CHANGELOG.md`