MCPcopy Create free account
hub / github.com/Kong/insomnia / addRemote

Method addRemote

packages/insomnia/src/sync/git/git-vcs.ts:1077–1092  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

1075 }
1076
1077 async addRemote(url: string) {
1078 console.log(`[git] Add Remote url=${url}`);
1079 await git.addRemote({
1080 ...this._baseOpts,
1081 remote: 'origin',
1082 url,
1083 force: true,
1084 });
1085 const config = await this.getRemote('origin');
1086
1087 if (config === null) {
1088 throw new Error('Remote not found remote=origin');
1089 }
1090
1091 return config;
1092 }
1093
1094 async listRemotes(): Promise<GitRemoteConfig[]> {
1095 return git.listRemotes({ ...this._baseOpts });

Callers 3

loadGitRepositoryFunction · 0.80
cloneGitRepoActionFunction · 0.80
updateGitRepoActionFunction · 0.80

Calls 2

getRemoteMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected