원클릭으로
rebase
// Rebase the current branch onto its base branch, resolve all conflicts, and verify lint, i18n, and build pass. Use when the user asks to rebase, update, or sync a branch with its upstream base.
// Rebase the current branch onto its base branch, resolve all conflicts, and verify lint, i18n, and build pass. Use when the user asks to rebase, update, or sync a branch with its upstream base.
Review a pull request for code quality, correctness, and project conventions. Use when the user asks to review a PR, code review, or examine changes on a branch. Accepts a GitHub PR URL, PR number, or local branch name.
Backport commits or PRs from main to a release branch. Use when the user asks to backport, cherry-pick, or port changes between branches, or when resolving conflicts from a cherry-pick onto a release branch.
Bump the project version across all release branches and commit the changes. Use when the user asks to do a release or update the version on all branches.
Review project AI skills for duplication, stale references, mistakes, and structural issues. Use when the user asks to review skills, audit skills, check for duplicate skills, or verify skill quality.
Review CSS for coding style, PatternFly token usage, and best practices. Use when the user asks to review CSS, check styles, or audit CSS files.
Run Cypress tests filtered by tag. Use when the user asks to run tests, run Cypress, or test a specific feature tag like @core or @attach.
| name | rebase |
| description | Rebase the current branch onto its base branch, resolve all conflicts, and verify lint, i18n, and build pass. Use when the user asks to rebase, update, or sync a branch with its upstream base. |
Rebase the current branch onto its base branch.
Read release-branches.md to get the list of branches. For each branch, compute the merge-base with HEAD and count the commits between them:
mb=$(git merge-base HEAD <branch>)
git rev-list --count "$mb"..HEAD
The base branch is whichever has the lowest commit count (fewest commits
between the merge-base and HEAD). If counts are tied, prefer main.
Tell the user which base branch was detected before proceeding.
Run git fetch upstream <base-branch> to update the remote tracking ref (this
is read-only and does not change any local branches), then compare:
git fetch upstream <base-branch>
git rev-list --count <base-branch>..upstream/<base-branch>
If the count is 0, the local base branch is up to date — skip ahead to Step 3.
If the count is greater than 0, tell the user how many commits their local base branch is behind the remote and ask whether they want to pull. Do NOT pull without the user's consent.
git checkout <base-branch> && git merge --ff-only upstream/<base-branch> && git checkout - then continue to Step 3.Save the current commit hash before rebasing so it can be used for comparison later:
pre_rebase_head=$(git rev-parse HEAD)
git rebase <base-branch>
If the rebase completes cleanly, skip to Step 4.
When conflicts occur, repeat this loop until the rebase finishes:
git diff --name-only --diff-filter=U to list conflicting files.<<<<<<<,
=======, >>>>>>>), and resolve them by keeping the correct version.
Prefer incoming (base-branch) changes for dependency updates and lockfile
entries; prefer the current branch's changes for feature code — but use
judgment and the surrounding context to decide.git add <files>.git rebase --continue.After the rebase succeeds, run the following commands in order, fixing any errors before moving on:
npm run lint-fix — fix lint/formatting issues automatically.npm run i18n — regenerate locale files.npm install needs to be run. Compare the
current package-lock.json against the saved pre-rebase commit:
git diff "$pre_rebase_head" -- package-lock.json
If there are changes, run npm install before continuing.npm run build — ensure the project compiles.If any step produces errors that lint-fix did not auto-resolve, fix them
manually and re-run the failing command until it passes.
Summarize what happened: