refactor(git): normalize rtk-prefix usage, add metadata.version
Two bundled fixes across the same nine skills, since both touch the same files. Issue #113: skill prose used rtk git and bare git inconsistently for the same operations, with no stated rule for which applied where. Executable instructed commands (a dispatch-table "Run" cell, a fenced code-block procedure, an imperative step) now consistently use rtk git; illustrative or referential mentions -- naming a flag's behavior, quoting a doc heading, warning against an anti-pattern -- stay bare git. Documented in the new plugins/git/README.md, scoped to this plugin only: gitea-* skills talk to the server over MCP tools and carry no git/rtk mentions at all. Also the git-plugin slice of #127: metadata.version added to the eight skills that lacked it. git-commits already had one and is untouched. Fixes: #113 Fixes: #127 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EeH8SCbcrCAQrtymkNuhKP
This commit is contained in:
@@ -9,31 +9,31 @@ source_keys:
|
||||
|
||||
Which remotes exist, where they point, and what they track.
|
||||
|
||||
`git remote show <name>` needs network access — use `-n` for cached data offline, or `git remote -v`, which lists URLs without querying.
|
||||
`rtk git remote show <name>` needs network access — use `-n` for cached data offline, or `rtk git remote -v`, which lists URLs without querying.
|
||||
|
||||
## Add, remove, rename, inspect
|
||||
|
||||
- **Add**: `git remote add <name> <url>`, or `-f` to fetch immediately
|
||||
- **Remove**: `git remote remove <name>` — deletes the remote, all its tracking refs, and its config
|
||||
- **Rename**: `git remote rename <old> <new>`
|
||||
- **Inspect**: `git remote -v` (URLs, offline) or `git remote show <name>` (live tracking status)
|
||||
- **Effective URLs**: `git remote get-url <name>` shows the URL after `insteadOf` rewrites; `git remote get-url --push --all <name>` lists every push URL
|
||||
- **Add**: `rtk git remote add <name> <url>`, or `-f` to fetch immediately
|
||||
- **Remove**: `rtk git remote remove <name>` — deletes the remote, all its tracking refs, and its config
|
||||
- **Rename**: `rtk git remote rename <old> <new>`
|
||||
- **Inspect**: `rtk git remote -v` (URLs, offline) or `rtk git remote show <name>` (live tracking status)
|
||||
- **Effective URLs**: `rtk git remote get-url <name>` shows the URL after `insteadOf` rewrites; `rtk git remote get-url --push --all <name>` lists every push URL
|
||||
|
||||
## Tracking, mirroring, housekeeping
|
||||
|
||||
- **Track one branch**: `git remote add -t <branch> <name> <url>` (repeatable); `--no-tags` suppresses tag import entirely
|
||||
- **Track one branch**: `rtk git remote add -t <branch> <name> <url>` (repeatable); `--no-tags` suppresses tag import entirely
|
||||
- **Mirror**: `--mirror=fetch` mirrors all refs locally (bare repos only); `--mirror=push` makes every push behave like `--mirror`
|
||||
- **Prune stale tracking refs without fetching**: `git remote prune <name>`, with `--dry-run` to preview
|
||||
- **Default branch pointer**: `git remote set-head <name> -a` (auto-detect, needs a prior fetch), `... <branch>` (explicit), `... -d` (delete `refs/remotes/<name>/HEAD`)
|
||||
- **Prune stale tracking refs without fetching**: `rtk git remote prune <name>`, with `--dry-run` to preview
|
||||
- **Default branch pointer**: `rtk git remote set-head <name> -a` (auto-detect, needs a prior fetch), `... <branch>` (explicit), `... -d` (delete `refs/remotes/<name>/HEAD`)
|
||||
|
||||
## `set-url` — full form
|
||||
|
||||
```bash
|
||||
git remote set-url <name> <newurl> # replace the first fetch URL
|
||||
git remote set-url <name> <newurl> <oldurl-regex> # replace only the URL matching regex
|
||||
git remote set-url --push <name> <url> # change push URL only (must point at same repo)
|
||||
git remote set-url --add <name> <url> # add an extra push URL (push to multiple remotes)
|
||||
git remote set-url --delete <name> <regex> # remove URLs matching regex
|
||||
rtk git remote set-url <name> <newurl> # replace the first fetch URL
|
||||
rtk git remote set-url <name> <newurl> <oldurl-regex> # replace only the URL matching regex
|
||||
rtk git remote set-url --push <name> <url> # change push URL only (must point at same repo)
|
||||
rtk git remote set-url --add <name> <url> # add an extra push URL (push to multiple remotes)
|
||||
rtk git remote set-url --delete <name> <regex> # remove URLs matching regex
|
||||
```
|
||||
|
||||
`--push` changes only where pushes go — fetch and push URLs must still reference the same repository. For genuine fetch-from-A / push-to-B workflows, use two separate named remotes instead; `--push` cannot do this.
|
||||
|
||||
Reference in New Issue
Block a user