Git 跨仓库引用更新
git.update_references
更新其他 Git 仓库中对本仓库中已移动、重命名或删除文件的引用
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 155
- Forks
- 170
01 前言 Front Matter
- model
- haiku
- description
- Update references in other Git repos to files moved, renamed, or deleted here
02 资源文件 8
- 参考文档README.md9.1 KB
- 参考文档references/advanced-features.md10.1 KB
- 参考文档references/architecture-diagrams.md4.7 KB
- 参考文档references/c4-diagrams.md14.9 KB
- 参考文档references/class-diagrams.md6.8 KB
- 参考文档references/erd-diagrams.md12.1 KB
- 参考文档references/flowcharts.md9.6 KB
- 参考文档references/sequence-diagrams.md9.0 KB
03 SKILL.md 正文
Goal
- Find files that were moved, renamed, updated, or deleted in the current repo and update all references to them in the other Git repos
Workflow
Find Changed Files
-
Find all the files moved, renamed, updated, or deleted in the current repo using a command line:
> invoke git_files --branch --only-print-files -
Print all the files that are moved, renamed, or deleted
- Print the main functions changed
Search for References
-
For each file
<FILE>, look for all the references to<FILE>in the repos:helper: the current repoumd_classes: located at~/src/umd_classes1csfy: located at~/src/csfy1orange: located at~/src/orange1lemonade: located at~/src/lemonade1
-
You must:
- Ignore searching in any Git sub repository of each repo (e.g.,
helpers_root) - Only search in files that are under Git control
- Ignore searching in symlinks (e.g.,
.claude) using an approach like:
search_repo() { local repo_path=$1 local search_term=$2 (cd "$repo_path" && { # Get submodule paths to exclude submodules=$(git config --file .gitmodules --name-only --get-regexp path 2>/dev/null | sed 's/.*path=//' | tr '\n' '|' | sed 's/|$//') if [ -n "$submodules" ]; then git ls-files | grep -v "^($submodules)" | while read -r file; do [ ! -L "$file" ] && echo "$file" done | xargs grep "$search_term" 2>/dev/null else git ls-files | while read -r file; do [ ! -L "$file" ] && echo "$file" done | xargs grep "$search_term" 2>/dev/null fi }) } - Ignore searching in any Git sub repository of each repo (e.g.,
-
Print the references in a table organized by:
- Repos
- Files
-
Create a vim quickfile cfile for the locations using the conventions in
.claude/skills/cfile.rules.md -
Pause and ask the user to continue
Update References
- Update the references in all the repos
Verification
- [ ] Confirm every reference to each moved, renamed, or deleted file was updated in every repo
- [ ] Re-run the search and confirm no stale reference remains
04 同仓库更多 Skills
Docker 文件同步与模板对齐
tutorial_in_60_mins.propagate_docker_changes
同步教程和课程项目的 Docker 文件,使其与 project_template 保持一致。
Markdown 合并至 Jupyter Notebook
tutorial_in_60_mins.merge_markdown
将 Markdown 文件的内容合并到 Jupyter Notebook 中。
60 分钟教程格式规范化
tutorial_in_60_mins.format
格式化目录,使其遵循「Learn X in 60 Minutes」(60 分钟学会 X)教程约定。
60 分钟教程目录创建
tutorial_in_60_mins.create
按照「Learn X in 60 Minutes」(60 分钟学会 X)约定创建教程目录。
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage