git.update_references
Update references in other Git repos to files moved, renamed, or deleted here
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- model
- haiku
- description
- Update references in other Git repos to files moved, renamed, or deleted here
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
tutorial_in_60_mins.propagate_docker_changes
Sync tutorial and class-project Docker files to match project_template
tutorial_in_60_mins.merge_markdown
Merge the content of a markdown file into a Jupyter notebook
tutorial_in_60_mins.format
Format a directory to follow the "Learn X in 60 Minutes" tutorial conventions
tutorial_in_60_mins.create
Create a tutorial directory for the Learn X in 60 Minutes conventions
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