Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions docs/batch-changes/rebasing-changesets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Rebasing changesets

<p className="subtitle">Learn how to rebase your existing changesets.</p>

<Callout type="note">This feature is supported for Sourcegraph versions 6.2 or more.</Callout>

If your codehost requires changesets to be up to date with the main branch, you can use the rebase functionality of the Web UI to update the changesets.

<Callout type="warning">Rebasing does not resolve merge conflicts.</Callout>

## Requirements

- Sourcegraph instance with repositories in it. See the [Quickstart](/#quick-install) guide on how to set up a Sourcegraph instance
- A [global service account token](/batch-changes/configuring-credentials#global-service-account-tokens) for Batch Changes (**a personal access token cannot currently be used for importing changesets**)

## Select changesets to rebase

After navigating to the changesets of your batch change, select one or more **published** changesets to rebase. You can only rebase changesets after they have been published to the codehost.

![List of changesets with two of them selected](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_changesets.png)

If a changeset is already up to date with the main branch, rebasing will result in no changes.

## Start the rebase bulk operation

With all applicable changesets selected, click the **Select action** button, and then select **Rebase changesets**.

![List of changesets and dropdown overlay](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_dropdown.png)

Confirm the popup to start the rebase bulk operation.

![Popup to confirm rebase action](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_confirm.png)

You can see the progress of the rebase operation in the **Bulk Actions** tab.

![List of bulk operations showing that rebase has completed](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_status.png)
1 change: 1 addition & 0 deletions src/data/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const navigation: NavigationItem[] = [
subsections: [
{ title: "Publishing Changesets", href: "/batch-changes/publishing-changesets", },
{ title: "Tracking Changesets", href: "/batch-changes/tracking-existing-changesets", },
{ title: "Rebasing Changesets", href: "/batch-changes/rebasing-changesets", },
]
},
{
Expand Down