Skip to content

docs(guide): add repo hygiene guidance - #33

Closed
pullfrog[bot] wants to merge 1 commit into
mainfrom
pullfrog/30-git-residue-audit
Closed

pullfrog[bot] wants to merge 1 commit into
mainfrom
pullfrog/30-git-residue-audit

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Closes #30

检测结论

对仓库的 Git refs 和提交历史做了完整盘点,结论如下:

✅ 干净的部分

  • 远端分支只剩 main,无 refs/original 备份引用、无多余分支
  • main 的 16 个提交历史中已无大文件(完整拉取后 .git 仅 1.2MB)
  • 工作树内的静态资源(favicon.png、funding_wechat.png 等)全部有引用,sitemap.xml、llms.txt、rss.xml 均与现有页面一致,未发现指向已删除页面的死链

❌ 发现的残留

残留 说明
标签 v1.0.0 指向历史重写前的孤儿提交 8ce2148(与 main 无共同祖先),其 tip 树包含约 141.1MB 的大文件,主要是 docs/public/data/ 下的 winemag-data_first150k.csv(约 49.8MB)、crime.csv(约 44.5MB)、sales.xlsx(约 16MB)等
Release「Release v1.0.0」 与上述标签绑定,删除标签时需一并处理
23 个已关闭 PR 的 refs/pull/*/head #1–#27、#28(除 #29 外)的 head 均与 main 无共同祖先,同样吊着旧历史,由 GitHub 托管无法自行删除

建议的处理方式

  1. 删除远端标签 v1.0.0 并删除对应 Release(或把标签重新指向当前 main):
    git push origin :refs/tags/v1.0.0
    执行仓库机器人的 contents:read 权限不足,无法代为执行,需管理员操作。
  2. refs/pull/* 残留需联系 GitHub Support 清理。
  3. 清理后仓库体积(当前约 42MB)不会立刻下降,需等待服务端垃圾回收。

本 PR 的改动

在 docs/guide/contributing.md 新增「仓库卫生」一节,沉淀本次检测的结论:日常提交避免大文件,以及历史重写后如何清理 refs/original、失效标签等残留引用。已通过 pnpm docs:build 验证。

Pullfrog  | View workflow run | via Pullfrog | Using GLM Flash | 𝕏

@pullfrog pullfrog Bot mentioned this pull request Sep 23, 2026
@mantoujun12

Copy link
Copy Markdown
Member

本 PR 仅新增仓库卫生说明文档,并未实际清理残留。#30 已通过直接删除孤儿标签/Release 并清理本地引用解决,故关闭本 PR。如仍希望补充该说明,可再单独提交。

@mantoujun12
mantoujun12 deleted the pullfrog/30-git-residue-audit branch September 23, 2026 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git残留检测

1 participant