create: SOTFAssist 独立 Git 仓库供 worktree 使用
MemRelay-Operation: memory-save:sotfassist-git-init-20261020-nested-main MemRelay-Resource: aedaf07d-7c8c-499a-b905-970722d5ba6f
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: SOTFAssist 独立 Git 仓库供 worktree 使用
|
||||
type: decision
|
||||
permalink: main/projects/d2b9f121-7638-43b7-97a8-17bdddcd238a/sotfassist-独立-git-仓库供-worktree-使用
|
||||
stable_id: aedaf07d-7c8c-499a-b905-970722d5ba6f
|
||||
scope: project
|
||||
memory_type: decision
|
||||
project_id: d2b9f121-7638-43b7-97a8-17bdddcd238a
|
||||
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||||
status: active
|
||||
revision: 1
|
||||
request_id: sotfassist-git-init-20261020-nested-main
|
||||
created_at: '2026-10-19T18:52:36.788527+00:00'
|
||||
updated_at: '2026-10-19T18:52:36.788527+00:00'
|
||||
tags:
|
||||
- git
|
||||
- worktree
|
||||
---
|
||||
|
||||
SOTFAssist 目录本身原来没有 .git。它是上级仓库 D:\Game\SonsOfTheForestMod(分支 kelvin-face,本次未改动的 HEAD 1691796f06468b25caa0c40ff282bdac1bac171b)里已被跟踪的一个目录。
|
||||
|
||||
用户要求在 SOTFAssist 建独立仓库,供多个 agent 用 git worktree 分开改、再合回 main。已在 D:\Game\SonsOfTheForestMod\SOTFAssist 执行 git init,默认分支 main。初始提交 d3dbfbbbd3117ac905d559f786e6bc75a714d2b3,信息为「chore: 建立游戏辅助仓库并纳入现有代码」。没有改上级仓库历史,没有改上级 .gitignore,没有 push,没有改 git config,没有改业务代码。
|
||||
|
||||
.gitignore 排除 bin/、obj/、.vs/、*.user、aidocs/、Preview/Library/、Preview/Logs/、Preview/Temp/、Preview/obj/、Preview/UserSettings/、Preview/*.log、*.csproj.user,以及根目录生成日志 PreviewCompile.log、PreviewCreate.log。源码、manifest.json、Ui 下的 cs 已纳入。Preview/Assets/Ui 是指向 D:\Game\SonsOfTheForestMod\SOTFAssist\Ui 的绝对路径目录联接,没有纳入版本库,避免把同一份源码再存一份。新 worktree 若要预览工程看到界面脚本,需要自己重建这个联接。
|
||||
|
||||
嵌套关系:上级仓库不会把 SOTFAssist/.git 列为未跟踪内容。上级仍跟踪原来已入库的 SOTFAssist 源码,并会把新的 SOTFAssist/.gitignore 以及原先未跟踪的源码显示为未跟踪。子目录 .gitignore 对上级仓库同样生效。不要自作主张改上级 .gitignore。
|
||||
|
||||
从 SOTFAssist 目录建 worktree 的命令:git worktree add ..\SOTFAssist-功能名 -b 功能名。该目录仍在上级工作区内,上级会看到这个新文件夹。没有远端。
|
||||
Reference in New Issue
Block a user