{"record":{"id":"55ebec2edf0f71a8","repo":"Kong/insomnia","slug":"no-changes-to-commit-please-stage-your-changes-fi","errorCode":null,"errorMessage":"No changes to commit. Please stage your changes first.","messagePattern":"No changes to commit\\. Please stage your changes first\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia-vcs/src/vcs.ts","lineNumber":667,"sourceCode":"  }\n\n  async getBranchNames(): Promise<string[]> {\n    const branches = await this._getBranches();\n    return branches.map(b => b.name);\n  }\n\n  async merge(candidates: StatusCandidate[], otherBranchName: string, snapshotMessage?: string) {\n    const branch = await this._getCurrentBranch();\n    console.log(`[sync] Merged branch ${otherBranchName} into ${branch.name}`);\n    return this._merge(candidates, branch.name, otherBranchName, snapshotMessage);\n  }\n\n  async takeSnapshot(name: string) {\n    const stage = clone<Stage>(this._stageByBackendProjectId[this._backendProjectId()] || {});\n\n    // Ensure there is something on the stage\n    if (Object.keys(stage).length === 0) {\n      throw new Error('No changes to commit. Please stage your changes first.');\n    }\n\n    const branch: Branch = await this._getCurrentBranch();\n    const parent: Snapshot | null = await this._getLatestSnapshot(branch.name);\n\n    if (!name) {\n      throw new Error('Commit must have a message');\n    }\n\n    const newState = applyStageToState(parent ? parent.state : [], stage);\n\n    const snapshot = await this._createSnapshotFromState(branch, newState, name);\n\n    // Clear the staged changes\n    for (const key of Object.keys(stage)) {\n      delete stage[key];\n    }\n    this._stageByBackendProjectId[this._backendProjectId()] = stage;","sourceCodeStart":649,"sourceCodeEnd":685,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-vcs/src/vcs.ts#L649-L685","documentation":"Error \"No changes to commit. Please stage your changes first.\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-vcs/src/vcs.ts:667 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}