From vgv-wingspan
Rebases current feature branch onto latest base branch (main/master/develop). Validates preconditions, stashes uncommitted changes, fetches updates, handles conflicts, and aborts on failure.
npx claudepluginhub verygoodopensource/very_good_claude_code_marketplace --plugin vgv-wingspanThis skill is limited to using the following tools:
Rebase the current feature branch onto the latest base branch to keep it up-to-date and prevent merge conflicts from accumulating.
Automates git rebase on main/master: fetches updates, rebases current branch, intelligently resolves conflicts, and force-pushes with lease. Use before PRs or merges.
Rebases current branch against target (default: main) to incorporate upstream changes. Stops on conflicts; --fix mode adds autonomous resolution and test-fix loops.
Rebases current Git branch onto target (main/origin/branch) with smart conflict resolution: analyzes target changes via git log, preserves both sides.
Share bugs, ideas, or general feedback.
Rebase the current feature branch onto the latest base branch to keep it up-to-date and prevent merge conflicts from accumulating.
Run these checks in order. If any fail, inform the user and stop.
git rev-parse --abbrev-ref HEAD
If the result is main, master, or develop — inform the user they're already on the base branch and stop.
Detect the base branch:
${CLAUDE_SKILL_DIR}/scripts/detect-base-branch.sh
If the script exits with an error, inform the user no base branch was found and stop.
git status --porcelain
If there are uncommitted changes, use AskUserQuestion:
Question: "You have uncommitted changes. Rebase requires a clean working tree. What would you like to do?"
Options:
git stash before rebasing, git stash pop aftergit fetch origin <base-branch> --quiet
Compare the merge base with the remote base:
git merge-base HEAD origin/<base-branch>
git rev-parse origin/<base-branch>
If they match, the branch is already up-to-date. Inform the user and stop.
git rebase origin/<base-branch>
Report how many commits ahead of the base branch:
git rev-list --count origin/<base-branch>..HEAD
Abort the rebase:
git rebase --abort
If changes were stashed in Step 1, restore them with git stash pop.
Inform the user that the rebase had conflicts and suggest resolving manually:
Automatic rebase failed due to conflicts. To resolve manually, run:
git rebase origin/<base-branch>
git push --force-with-lease) after a successful rebase — warn them.git stash pop can itself cause conflicts if stashed changes overlap with rebased commits. If stash pop fails, inform the user and suggest git stash show to review the stashed changes.HEAD instead of a branch name) means the user is not on any branch. Inform them and stop — do not attempt to rebase.git fetch in Step 2 will create the remote tracking ref. The rebase uses origin/<base-branch>, not the local branch.