refactor(git-commits): retrofit to the ADR-0020 context contract

Description 724 -> 214 chars, body 1102 -> 343 words, Gotchas 12 -> 3.
Create, rewrite, and cherry-pick flows move to self-contained references/
files behind a dispatch table.

The audit caught that moving the secret scan into the create flow left the
amend/squash path with no check in its loaded context; it is now a gate
common to every flow. Also re-homes the interactive-rebase reflog warning
git-history dropped, since this skill owns rebase.
This commit is contained in:
2026-08-30 13:10:53 +00:00
parent bbc73008a3
commit f3b4860e14
16 changed files with 260 additions and 214 deletions

View File

@@ -0,0 +1,12 @@
---
source_keys:
- context7-git-htmldocs
---
# Cherry-picking a commit
1. **Identify the source commit** — a hash or a branch reference.
2. **Confirm the destination** — cherry-pick replays onto the branch currently checked out, so verify that is the intended branch before running anything.
3. **Execute** — `rtk git cherry-pick <commit-hash>`. A range is `<a>..<b>` (exclusive of `<a>`) or `<a>^..<b>` (inclusive); `-n` stages without committing, for when the replay needs editing first.
4. **Handle conflicts** — if the replay halts, offer resolution or `rtk git cherry-pick --abort`. Never resolve automatically without confirmation.
5. **Report the outcome** — which commits replayed, which conflicted, and which were rejected.