{"record":{"id":"cc5bb529fc56ee81","repo":"Kong/insomnia","slug":"remote-history-conflict-please-pull-latest-change","errorCode":null,"errorMessage":"Remote history conflict. Please pull latest changes and try again","messagePattern":"Remote history conflict\\. Please pull latest changes and try again","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia-vcs/src/vcs.ts","lineNumber":763,"sourceCode":"      throw new Error('teamId should be defined');\n    }\n\n    const teamKeys = await this._queryTeamMemberKeys(teamId);\n    return this._queryCreateProject(rootDocumentId, name, teamId, teamProjectId, teamKeys.memberKeys);\n  }\n\n  // TODO: may be we can create another push function for initial push, so that we can reduce some api calls\n  async push({ teamId, teamProjectId }: { teamId: string; teamProjectId: string }) {\n    await this._getOrCreateRemoteBackendProject({ teamId, teamProjectId });\n    const branch = await this._getCurrentBranch();\n    // Check branch history to make sure there are no conflicts\n    let lastMatchingIndex = 0;\n    const remoteBranch: Branch | null = await this._queryBranch(branch.name);\n    const remoteBranchSnapshots = remoteBranch ? remoteBranch.snapshots : [];\n\n    for (; lastMatchingIndex < remoteBranchSnapshots.length; lastMatchingIndex++) {\n      if (remoteBranchSnapshots[lastMatchingIndex] !== branch.snapshots[lastMatchingIndex]) {\n        throw new Error('Remote history conflict. Please pull latest changes and try again');\n      }\n    }\n\n    // Get the remaining snapshots to push\n    const snapshotIdsToPush = branch.snapshots.slice(lastMatchingIndex);\n\n    if (snapshotIdsToPush.length === 0) {\n      throw new Error('Already up to date');\n    }\n\n    // Gather a list of snapshot state entries to push\n    const allBlobIds = new Set<string>();\n    const snapshots: Snapshot[] = [];\n\n    for (const id of snapshotIdsToPush) {\n      const snapshot = await this._assertSnapshot(id);\n      snapshots.push(snapshot);\n","sourceCodeStart":745,"sourceCodeEnd":781,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia-vcs/src/vcs.ts#L745-L781","documentation":"Error \"Remote history conflict. Please pull latest changes and try again\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia-vcs/src/vcs.ts:763 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"}