pcottle/learnGitBranching · warning · GitError
git-error-rebase-none
Error message
git-error-rebase-none
What it means
The rebase commit filter found zero commits with exactly one parent to replay — i.e. there is nothing eligible to rebase (only root/merge commits, or everything is already in the stop set). Real git similarly aborts with 'Current branch is up to date' style messages when no commits need moving.
Solutions
- Skip the rebase — the branches are already in the desired relationship
- Rebase a branch that actually has unique commits above the target
- If merge commits are involved, flatten them first or cherry-pick manually
Defensive patterns
Strategy: validation
Validate before calling
var eligible = commits.filter(function(c){ return c.get('parents').length === 1 && !stopSet[c.get('id')]; });
if (!eligible.length) skipRebase(); Try / catch
try { rebase(); } catch (e) { if (e instanceof GitError && /rebase/.test(e.msg)) return; throw e; } Prevention
- Ensure the source branch has unique commits before rebasing
- Don't re-run completed rebases
When it happens
Trigger: Calling rebase where every commit reachable from the source is either in the stop set or has != 1 parents, leaving toRebase empty — e.g. rebasing a branch that is already an ancestor of the target.
Common situations: Rebasing an up-to-date branch; re-applying a level solution rebase twice; rebasing where the only unique commit is a merge commit.
Related errors
- git-error-origin-fetch-uptodate
- git-result-nothing
- git-result-uptodate
- Hey those commits don't exist in the set!
- bad-branch-name
AI-assisted analysis of pcottle/learnGitBranching@5b09d0ff96 (2026-08-27).
Data as JSON: /api/errors/e636252544071741.
Report an issue: GitHub.
Appendix: source
Thrown at src/js/git/index.js:2345
if (stopSet[popped.get('id')]) {
continue;
}
toRebaseRough.push(popped);
pQueue = pQueue.concat(popped.get('parents'));
pQueue.sort(this.dateSortFunc);
}
// throw out merge's real fast and see if we have anything to do
var toRebase = [];
toRebaseRough.forEach(function (commit) {
if (commit.get('parents').length == 1) {
toRebase.push(commit);
}
});
if (!toRebase.length) {
throw new GitError({
msg: intl.str('git-error-rebase-none')
});
}
return toRebase;
};
GitEngine.prototype.rebaseInteractiveTest = function(targetSource, currentLocation, options) {
options = options || {};
// Get the list of commits that would be displayed to the user
var toRebase = this.getInteractiveRebaseCommits(targetSource, currentLocation);
var rebaseMap = {};
toRebase.forEach(function (commit) {
var id = commit.get('id');
rebaseMap[id] = commit;
});View on GitHub (pinned to 5b09d0ff96)