rebase-latest-default

Rebases a worktree feature branch onto the default branch tip and verifies the resulting candidate commit.

4|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/laicluse/agent-fieldkit --skill rebase-latest-default-laicluse
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rebase-latest-default
Source: https://github.com/laicluse/agent-fieldkit/tree/main/.agents/plugins/generated/git-discipline/skills/rebase-latest-default
Command: npx skills add https://github.com/laicluse/agent-fieldkit --skill rebase-latest-default-laicluse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping long-lived feature branches in parallel git worktrees synchronized with the default branch is error-prone: developers often rebase against stale remote-tracking refs, lose verification evidence, or accidentally force-push protected branches. This Skill performs the rebase against the actual default-branch tip and attaches fresh test evidence to the resulting candidate commit. ## Core Features & Use Cases - Policy-aware rebasing: Resolves the repository mode (local-only, auto-trunk, gated-trunk, pr-flow, external) and rebases against the local or freshly fetched remote default tip via the shared git-discipline command. - Conflict ownership: Guides in-worktree conflict resolution, regenerating generated files from canonical inputs instead of hand-merging them. - Verified candidates: Runs the repository's deterministic test command through the git-discipline executable so evidence is recorded against both the candidate SHA and the default SHA. - Safe publication: Completes rebases of published feature branches with git push --force-with-lease, while never force-pushing the default branch. - Use Case: A developer working in a git worktree needs to update their feature branch before merging; the Skill fetches the true default tip, rebases, resolves conflicts, runs the test suite, and reports old and new candidate SHAs. ## Quick Start Ask the agent to rebase the current worktree branch onto the latest default branch and verify it with the repository's test command.

Frequently Asked Questions about rebase-latest-default

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rebase a feature branch on the latest default branch in a git worktree?▼

Resolve the repository mode with the git-discipline policy script, then run the git-discipline rebase command with --local for local-only repos or --remote otherwise. The remote mode fetches only FETCH_HEAD, leaving remote-tracking refs and force-with-lease baselines untouched.

How do I verify a rebased branch before merging?▼

Run the repository's deterministic test command through the git-discipline verify command with the same --local or --remote target. Evidence is recorded against both the candidate SHA and the current default SHA, and a failed command removes mergeability for that candidate.

Can I force-push a rebased feature branch safely?▼

Yes, use git push --force-with-lease to update an already-published feature branch after a rebase, but only when repository policy permits writes. Never force-push the default branch, and first publication or external mode remains operator-owned.

What should I do when a rebase hits merge conflicts?▼

Resolve conflicts inside the same worktree by inspecting both intents, staging the resolution, and continuing the rebase. Regenerate generated files from their canonical inputs rather than hand-merging, and stop only for genuinely ambiguous product decisions.

When does a rebased candidate need re-verification?▼

Any later commit, amend, rebase, or default-branch advance invalidates prior evidence and requires running verification again. Verification is always tied to the specific candidate SHA and default SHA pair.