Files
TheRock/rocm-systems/projects/rocprofiler-compute/.ai/skills/rocprof-compute-rebase-pr.md
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

2.8 KiB

Rebase PR onto origin/rocprofiler-compute-develop

Follow AGENTS.md and the full redirect chain it references.

Goal

Cherry-pick the user's commits onto the latest origin/rocprofiler-compute-develop so the PR has a clean, linear history. Only the user's own commits should appear in the PR — no merge commits, no commits from other contributors.

Note: We call this "rebasing" but the procedure is actually reset + cherry-pick. A true git rebase is impractical when the branch history contains merge commits that cause cascading conflicts.

Steps

  1. Detect the current branch.

    • Run: git rev-parse --abbrev-ref HEAD
    • If the branch is rocprofiler-compute-develop or develop, stop — the user must checkout their PR branch first.
  2. Ensure the PR base branch is rocprofiler-compute-develop.

    • Run: gh pr view --json number,baseRefName (uses the current branch).
    • If the command fails (no open PR), tell the user to create a PR first or proceed without this check if they confirm.
    • If baseRefName is NOT rocprofiler-compute-develop, tell the user:

      The PR base is currently <baseRefName>. Please change it to rocprofiler-compute-develop on GitHub: PR page → Edit (next to title) → base dropdown → select rocprofiler-compute-develop → Save.

    • Wait for confirmation before continuing.
  3. Fetch the latest upstream.

    • Run: git fetch origin
  4. Identify the user's commits.

    • Run: git log --reverse --oneline origin/rocprofiler-compute-develop..<branch-name> --no-merges
    • Present the list and ask the user to confirm which commits are theirs. Do NOT assume — other contributors' commits may be mixed in.
    • Collect the confirmed hashes in the same order shown (oldest-to-newest) for step 6.
  5. Create a safety backup, then reset the branch to the upstream base.

    • Run: git branch <branch-name>-backup
    • Run: git reset --hard origin/rocprofiler-compute-develop
  6. Cherry-pick the confirmed commits (oldest first).

    • Run: git cherry-pick <hash1> <hash2> ... <hashN> (all in one command).
    • If a commit is already in rocprofiler-compute-develop, the cherry-pick will report "empty commit" — run git cherry-pick --skip to continue.
    • If there is a conflict, help the user resolve it, stage the file(s), then run git cherry-pick --continue to proceed to the next commit.
  7. Verify the result.

    • Run: git log --oneline origin/rocprofiler-compute-develop..HEAD
    • Confirm only the user's commits appear and there are no merge commits.
  8. Force-push.

    • Run: git push --force-with-lease origin <branch-name>
    • Tell the user: the PR on GitHub may take some time to sync — the file-changed count and diff may not immediately reflect the rebase.