docs: incorporate Gitea URL migration into tools organization spec
Gitea moved from gitea.server10086.icu to gitea.misdev.icu (old domain decommissioned). Spec now covers repo-wide URL unification alongside tools/ reorganization. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -53,18 +53,37 @@ CargoTrace/
|
||||
|
||||
- 从根目录 `WareShipManifest/` 迁至 `tools/WareShipManifest/`。
|
||||
- 性质:submodule **路径变更**,需更新 `.gitmodules` 的 `path` 字段并同步 git 索引,**不是**简单 `mv`。
|
||||
- ⚠️ **URL 隐患**:`.gitmodules` 中该 submodule 的 URL 为 `git@gitea.server10086.icu:CargoTrace/WareShipManifest.git`,而子仓库实际 remote 指向 `git@gitea.misdev.icu:CargoTrace/WareShipManifest.git`。实施时需核实两个域名是否指向同一 Gitea 实例,并统一 `.gitmodules` URL,避免 `git submodule update --init` 拉错源。
|
||||
- ✅ **URL 已确认统一**:Gitea 已整体从 `gitea.server10086.icu` 迁移至 `gitea.misdev.icu`,旧域名弃用(详见「URL 统一」节)。WareShipManifest 子仓库 remote 已指向 misdev,`.gitmodules` 待同步。
|
||||
- 子仓库当前默认分支为 `main`,与 `apps/`、`services/` 的 `master` 不一致(记录,本次不强改)。
|
||||
|
||||
### attachmentQRCodeGenerator(游离仓库转正)
|
||||
|
||||
- 现状:有独立 `.git`,主仓库不跟踪,无 remote。
|
||||
- 三步:
|
||||
1. 在 Gitea(`CargoTrace` 组织下)建独立仓库。
|
||||
1. 在 `gitea.misdev.icu`(`CargoTrace` 组织下)建独立仓库 `attachmentQRCodeGenerator`。
|
||||
2. 为本地仓库设 remote,推送现有提交历史。
|
||||
3. 在主仓库执行 `git submodule add <url> tools/attachmentQRCodeGenerator`,纳入管理。
|
||||
- ⚠️ **备份文件**:目录内含 7 个 `*.bak.*.xlsm` 备份。建仓时需定 `.gitignore`,建议忽略 `.bak` 文件,仅纳入当前 `压力表标签查询打印_界面预览.xlsm`、`附件标签-刘洪.btw` 以及 `VBA-Excel/` 源码。
|
||||
|
||||
## URL 统一(Gitea 迁移)
|
||||
|
||||
> 旧域名 `gitea.server10086.icu` 已弃用,全仓库 Gitea URL 统一迁移至 `gitea.misdev.icu`。**只换域名**,仓库路径与组织不变。
|
||||
|
||||
需修改的对象:
|
||||
|
||||
| 对象 | 当前 | 目标 |
|
||||
|---|---|---|
|
||||
| 主仓库 origin | `git@gitea.server10086.icu:admin/CargoTrace.git` | `git@gitea.misdev.icu:admin/CargoTrace.git` |
|
||||
| `.gitmodules` · pad_scanner | `git@gitea.server10086.icu:CargoTrace/pad_scanner.git` | `…@gitea.misdev.icu:CargoTrace/pad_scanner.git` |
|
||||
| `.gitmodules` · fastapi | `git@gitea.server10086.icu:CargoTrace/fastAPI.git` | `…@gitea.misdev.icu:CargoTrace/fastAPI.git` |
|
||||
| `.gitmodules` · WareShipManifest | `git@gitea.server10086.icu:CargoTrace/WareShipManifest.git` | `…@gitea.misdev.icu:CargoTrace/WareShipManifest.git` |
|
||||
| pad_scanner 本地 remote | `gitea.server10086.icu` | `git -C apps/pad_scanner remote set-url origin <misdev>` |
|
||||
| fastapi 本地 remote | `gitea.server10086.icu` | `git -C services/fastapi remote set-url origin <misdev>` |
|
||||
| WareShipManifest 本地 remote | 已是 `gitea.misdev.icu` ✓ | 无需改 |
|
||||
| attachmentQRCodeGenerator | 新建 | `git@gitea.misdev.icu:CargoTrace/attachmentQRCodeGenerator.git` |
|
||||
|
||||
说明:改 `.gitmodules` 只影响新 clone 的来源;已 checkout 的子仓库需另行 `git remote set-url`。换 URL 不改变 submodule 指向的 commit,无内容风险。
|
||||
|
||||
## tools/README.md 约定
|
||||
|
||||
新增 `tools/README.md`,内容包括:
|
||||
@@ -79,6 +98,10 @@ CargoTrace/
|
||||
|
||||
## 范围边界(YAGNI)
|
||||
|
||||
本次**纳入**:
|
||||
|
||||
- 全仓库 Gitea URL 统一到 `gitea.misdev.icu`(旧域 `gitea.server10086.icu` 已弃用)。见「URL 统一」节。
|
||||
|
||||
本次**不做**:
|
||||
|
||||
- `tools/` 二级分类(扁平结构够用;待工具增至约 8 个再按用途细分)。
|
||||
@@ -89,7 +112,7 @@ CargoTrace/
|
||||
|
||||
| 项 | 说明 | 处置 |
|
||||
|---|---|---|
|
||||
| submodule URL 不一致 | WareShipManifest 的 `.gitmodules` URL 与实际 remote 不同 | 实施前核实 Gitea 域名,统一 |
|
||||
| submodule URL 旧域弃用 | 全仓库仍引用 `gitea.server10086.icu`(已弃用) | 统一改为 `gitea.misdev.icu`,见「URL 统一」节 |
|
||||
| 游离仓库历史 | attachmentQRCodeGenerator 现有 `.git` 历史是否保留 | 默认保留并 push;若含敏感信息需先清理 |
|
||||
| 备份文件体积 | 7 个 `.bak` xlsm 二进制 | `.gitignore` 忽略 `.bak` |
|
||||
| submodule 路径迁移 | 直接 `mv` 会破坏 submodule 登记 | 用 `.gitmodules` + 索引同步方式,非 `mv` |
|
||||
|
||||
Reference in New Issue
Block a user