Skip to main content

publishRemote

client.git.publishRemote(data: GitPublishRemoteRequest): Promise<unknown>

Publishes the local repository to a new remote.

Sets up a remote and pushes the local repository to it for the first time. Use this when the repository does not yet have a remote configured.

Parameters

ParameterTypeRequiredDescription
dataGitPublishRemoteRequestYesRemote publication parameters including the target URL

Returns

Promise<unknown> — A promise that resolves when publishing is complete

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.git.publishRemote(/* GitPublishRemoteRequest */);
console.log(result);