Function push

  • Push a branch or tag.

    The push command returns an object that describes the result of the attempted push operation. Notes: If there were no errors, then there will be no errors property. There can be a mix of ok messages and errors messages.

    param type [= default] description
    ok Array<string> The first item is "unpack" if the overall operation was successful. The remaining items are the names of refs that were updated successfully.
    errors Array<string> If the overall operation threw and error, the first item will be "unpack {Overall error message}". The remaining items are individual refs that failed to be updated in the format "{ref name} {error message}".

    Returns

    Resolves successfully when push completes with a detailed description of the operation from the server.

    Example

    const pushResult = await push({
    fs,
    http,
    dir: '/tutorial',
    remote: 'origin',
    ref: 'main',
    onAuth: () => ({ username: process.env.GITHUB_TOKEN }),
    })
    console.log(pushResult)

    Parameters

    Returns Promise<PushResult>

Generated using TypeDoc