Kong/insomnia · error
No changes to commit. Please stage your changes first.
Error message
No changes to commit. Please stage your changes first.
What it means
takeSnapshot found the stage for the current backend project empty, so there is nothing staged to create a commit from.
Solutions
- Stage changes (via sync staging API / UI) before taking a snapshot
- Skip the commit when there is nothing staged
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/insomnia-vcs/src/vcs.ts:667 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26).
Data as JSON: /api/errors/55ebec2edf0f71a8.
Report an issue: GitHub.
Appendix: source
Thrown at packages/insomnia-vcs/src/vcs.ts:667
}
async getBranchNames(): Promise<string[]> {
const branches = await this._getBranches();
return branches.map(b => b.name);
}
async merge(candidates: StatusCandidate[], otherBranchName: string, snapshotMessage?: string) {
const branch = await this._getCurrentBranch();
console.log(`[sync] Merged branch ${otherBranchName} into ${branch.name}`);
return this._merge(candidates, branch.name, otherBranchName, snapshotMessage);
}
async takeSnapshot(name: string) {
const stage = clone<Stage>(this._stageByBackendProjectId[this._backendProjectId()] || {});
// Ensure there is something on the stage
if (Object.keys(stage).length === 0) {
throw new Error('No changes to commit. Please stage your changes first.');
}
const branch: Branch = await this._getCurrentBranch();
const parent: Snapshot | null = await this._getLatestSnapshot(branch.name);
if (!name) {
throw new Error('Commit must have a message');
}
const newState = applyStageToState(parent ? parent.state : [], stage);
const snapshot = await this._createSnapshotFromState(branch, newState, name);
// Clear the staged changes
for (const key of Object.keys(stage)) {
delete stage[key];
}
this._stageByBackendProjectId[this._backendProjectId()] = stage;View on GitHub (pinned to d9bb2b0142)