Search
ctrl/
Ask AI
Light
Dark
System

edgedb branch rebase

Create a branch based on the target branch but including new migrations on the current branch.

edgedb branch rebase [options] name

This CLI command requires CLI version 4.0 or later and EdgeDB version 5.0 or later. Earlier versions did not feature branches and instead featured databases. Databases offered no analog to rebasing. See the edgedb database command suite to manage databases.

Creates a new branch that is based on the target branch, but also contains any new migrations on the current branch.

When rebasing, the data of the target branch is preserved. This means that if you switch to a branch feature and run edgedb branch rebase main, you will end up with a branch with the schema from main and any new migrations from feature and the data from main.

For more about how rebasing works, check out the breakdown in our schema migrations guide.

The branch rebase command runs in the EdgeDB instance it is connected to. For specifying the connection target see connection options.

name

The name of the target branch.