27 lines
1.4 KiB
Markdown
27 lines
1.4 KiB
Markdown
# Git 同步规则
|
|
|
|
远程:`ssh://git@192.168.10.31:2222/qishizhe/digital-drosophila.git`。
|
|
服务器→Git 服务免密读取已确认;本机→计算服务器是另一条独立认证链。
|
|
首次建立 `codex/project-bootstrap`,不 force push,不伪造旧阶段 commits。
|
|
|
|
```bash
|
|
cd /data/digital-drosophila
|
|
git status --short
|
|
git diff --stat
|
|
# 只添加明确需要的代码、文档和新清单,先审查再提交。
|
|
git add docs references registry tools README.md NOTICE.md .gitignore .gitattributes
|
|
python3 -B tools/repo_guard.py
|
|
git diff --cached --stat
|
|
git commit -m 'Document audited project update'
|
|
git push origin codex/project-bootstrap
|
|
```
|
|
|
|
源代码更新须显式列出路径;不要为整理仓库修改已封存模型文件。
|
|
`.gitattributes` 禁用文本换行转换以保留旧源码哈希;本仓库 local core.autocrlf=false。
|
|
不要运行 `git clean -fdx`、强制 reset、会删 ignored 数据的清理工具,或对现有项目做镜像删除同步。
|
|
不要使用 `git add -f datasets experiments` 绕过防护。
|
|
|
|
`repo_guard.py` 检查 staged blob:数据/环境/嵌套仓库、>25 MiB 文件、常见凭据标记;它不是完备的 DLP/安全扫描器,仍需人工审查。
|
|
首次提交身份 `Digital Drosophila Archive <archive@localhost>` 是归档机器人,不代表研究作者。
|
|
仓库 default branch 可由服务管理员选择;本次不改服务的全局设置。
|