بنقرة واحدة
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 creating, reviewing, or updating a BRIEF.md (the quality law for a surface), defining what "good"/shippable means, or setting up a verified autonomous loop.
Use when checking deployment health, investigating errors, reading logs, or working with Tiltfiles. Queries Tilt resource status, logs, and manages dev environments.
Use when starting tilt, debugging Tiltfile errors, or bootstrapping a dev environment. Starts Tilt in zmx, monitors bootstrap to healthy state, fixes Tiltfile bugs without hard-coding or fallbacks.
Use when creating commits, managing branches, opening PRs, or rewriting history. Not for non-git implementation tasks or repo-specific release policy decisions.
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 interacting with USB-attached iOS devices via pymobiledevice3 — screenshots, syslog, crash reports, app install/launch/pull, file transfer, sysmon perf, TCP port forwarding, WebInspector/CDP, and device diagnostics.
| name | git-rebase-sync |
| description | Use when syncing a feature branch onto the latest origin base branch via git rebase. |
| metadata | {"short-description":"Rebase branch sync"} |
Use this skill when you need to sync a feature branch onto the latest origin/{base_branch} via git rebase, including conflict resolution with explicit clarification questions when intent is ambiguous.
dev or main).git rebase ..., git push --force*), print the exact command(s) you will run and wait for my confirmation.git push --force-with-lease, never plain --force.git branch --show-currentgh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'git fetch origingit statusgit status indicates an in-progress merge/rebase/cherry-pick, stop and ask what to do (abort vs continue).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) or flatten them (plain rebase).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 so I can verify them manually 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 --continueHelpful 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 push --force-with-lease origin HEAD:{branch_name}git push --force-with-lease origin {stacked_branch}{backup_ref} to restore the pre-rebase state.git reset --hard) unless I explicitly confirm after you show the exact command.