gitbutlerapp/gitbutler · error
No rebase steps provided
Error message
No rebase steps provided
What it means
RebaseBuilder::rebase executes the accumulated rebase steps and requires at least one step. This error is thrown when rebase() is called on a builder with an empty steps list, because there is no history rewrite to perform.
Solutions
- Check that steps is non-empty before calling rebase(), or return early instead
- Push at least one RebaseStep (e.g. a Pick or Reference step) before running
- Refactor callers to skip the rebase entirely when no operations are needed
Example fix
// before
editor.rebase()?;
// after
if !editor.steps.is_empty() {
editor.rebase()?;
} Defensive patterns
Strategy: validation
Validate before calling
fn run_rebase(editor: &mut Editor<...>) -> anyhow::Result<Option<RebaseOutput>> {
if editor.steps.is_empty() { return Ok(None); }
Ok(Some(editor.rebase()?))
} Try / catch
if editor.steps.is_empty() {
tracing::warn!("skipping rebase: no steps");
return Ok(());
}
let out = editor.rebase().context("rebase failed")?; Prevention
- Check the step list before invoking rebase()
- Skip the rebase flow entirely when no steps were added
- Log why steps were filtered out so empty runs are visible
When it happens
Trigger: Constructing an Editor/RebaseBuilder and calling .rebase() without pushing any RebaseStep entries — e.g. a code path where all candidate steps were filtered out beforehand.
Common situations: Automations that conditionally add steps (fixups, reference moves) and end up with zero steps when conditions don't match, then call rebase unconditionally.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Aborting due to empty
- Fixup commit must not come after a reference step
- Fixup must have a commit to work on
- Invalid parent delimitation: requested child is not a…
- Invalid parent delimitation: requested parent is not a…
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/03a80596ba47b8af.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but-rebase/src/lib.rs:146
self
}
/// Performs a rebase on top of a given base, according to the provided steps, or fails if no step was provided.
/// It does not actually create new git references nor does it update existing ones, it only deals with
/// altering commits and providing the information needed to update refs.
///
/// Use it to
///
/// - drop commits
/// - insert new commits
/// - reorder commits
/// - rewrite the history at will
///
/// **However, note that it will also make all input commits sequential, so the caller must assure
/// these actually form a 'line'.**
pub fn rebase(&mut self) -> Result<RebaseOutput> {
if self.steps.is_empty() {
return Err(anyhow!("No rebase steps provided"));
}
let pick_mode = if self.rebase_noops {
PickMode::Unconditionally
} else {
PickMode::SkipIfNoop
};
rebase(
self.repo,
self.base,
self.base_substitute,
std::mem::take(&mut self.steps),
pick_mode,
)
}
}
impl Rebase<'_> {
/// Pick, Merge and Fixup operations:View on GitHub (pinned to 58e5313667)