원클릭으로
git-rebase-sync
Use when syncing a feature branch onto the latest origin base branch via git rebase.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when syncing a feature branch onto the latest origin base branch via git rebase.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when the user says they are stepping away and the agent should continue without interactive approvals
Use when running e2e tests, debugging test failures, or fixing flaky tests. Covers failure taxonomy, fix rules, and workflow. Never changes source code logic or API without spec backing.
Use when auditing how well the shared agent instructions (AGENTS.md, skills) hold up in real sessions — sampling transcripts via recall, scoring them against the gap rubric, and turning findings into ratified amendments
Use when preparing clean, logical git commits from an existing working tree
Fetch latest from origin, prune remote-tracking refs, delete stale local branches and worktrees, and fast-forward important branches. Use when tidying up a worktree-based repo layout.
Use when preserving enough task context for another agent or future session to continue without the current conversation
| name | git-rebase-sync |
| description | Use when syncing a feature branch onto the latest origin base branch via git rebase. |
Use this skill when you need to sync a feature branch onto the latest origin/{base_branch} via git rebase, including deliberate conflict resolution. Invoking this skill is the order to rebase: the local rebase runs behind a backup tag as reversible interior work — print each history-rewriting command as a status line, do not wait for confirmation. Pushes follow per-ref publish semantics (step 9).
dev or main).--force-with-lease, per-ref push semantics.git rebase ..., git push --force*) as a one-line status before running it.git push --force-with-lease, never plain --force.git branch --show-currentgit symbolic-ref --short refs/remotes/origin/HEAD (strip the origin/ prefix; if unset, use your forge CLI or git remote show origin)git fetch origingit statusgit status indicates an in-progress merge/rebase/cherry-pick, do not stack a rebase on top: investigate what it is and finish or abort it first; surface it to the user only if its state is genuinely unclear.HEAD:
git tag -a {branch_name}-rebase-backup-$(date +%Y%m%d-%H%M%S) -m "pre-rebase backup" HEAD{backup_ref} for recovery.git rev-list --count --merges origin/{base_branch}..HEAD--rebase-merges) when the merge structure carries meaning, flatten (plain rebase) when it is noise. Log the call as a provisional decision.Other local branches may point at intermediate commits in the range being rewritten (origin/{base_branch}..HEAD) — common with phased NN-description stacks. A plain rebase rewrites those commits and orphans the stacked branches on the old, pre-rebase commits (along with every open PR built on them). --update-refs (the default in step 6) moves them onto the rewritten commits instead. Enumerate them so you can report what the rebase will carry along:
# Branches pointing into the range being rewritten — these get orphaned by a
# plain rebase and require --update-refs to follow the rewrite.
cur=$(git branch --show-current)
git for-each-ref --format='%(refname:short)' refs/heads | while read -r br; do
[ "$br" = "$cur" ] && continue
if git merge-base --is-ancestor "$br" HEAD \
&& ! git merge-base --is-ancestor "$br" origin/{base_branch}; then
echo "stacked: $br ($(git rev-parse --short "$br"))"
fi
done
--update-refs (git will not move a checked-out branch); flag these for manual verification after the rebase.--update-refs so any stacked branch pointing into the rewritten range follows the rewrite instead of being orphaned.git rebase --update-refs origin/{base_branch}git rebase --rebase-merges --update-refs origin/{base_branch}git config --global rebase.updateRefs true.When conflicts happen:
git statusgit add <file...>git rebase --continuegit rebase --abort is safe) and report an honest block: what was tried, why it cannot converge, and the batched questions.Helpful commands during conflicts:
git diffgit showgit rebase --abort (this is safe and should be preferred over destructive resets)git log --oneline --decorate origin/{base_branch}..HEADgit rebase --update-refs prints an "Updated the following refs with --update-refs" summary; the moved branch refs should also appear as decorations on the new commits in the log above. Note any that did not move (e.g. checked out in another worktree) for manual handling.--update-refs only moves local refs. A normal git push updates the current branch only — each stacked branch (from step 5) that also exists on origin must be force-pushed individually.git shortlog -sn origin/{base_branch}..{ref} — other authors present means the ref is shared.git push --force-with-lease origin HEAD:{branch_name}git push --force-with-lease origin {stacked_branch}git reset --hard {backup_ref}