async function push({
  fs,
  http,
  onProgress,
  onMessage,
  onAuth,
  onAuthSuccess,
  onAuthFailure,
  onPrePush,
  dir,
  gitdir = join(dir, '.git'),
  ref,
  remoteRef,
  remote = 'origin',
  url,
  force = false,
  delete: _delete = false,
  corsProxy,
  headers = {},
  cache = {},
}) {
  try {
    assertParameter('fs', fs)
    assertParameter('http', http)
    assertParameter('gitdir', gitdir)

    return await _push({
      fs: new FileSystem(fs),
      cache,
      http,
      onProgress,
      onMessage,
      onAuth,
      onAuthSuccess,
      onAuthFailure,
      onPrePush,
      gitdir,
      ref,
      remoteRef,
      remote,
      url,
      force,
      delete: _delete,
      corsProxy,
      headers,
    })
  } catch (err) {
    err.caller = 'git.push'
    throw err
  }
}
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}". |

@param {object} args
@param {FsClient} args.fs - a file system client
@param {HttpClient} args.http - an HTTP client
@param {ProgressCallback} [args.onProgress] - optional progress event callback
@param {MessageCallback} [args.onMessage] - optional message event callback
@param {AuthCallback} [args.onAuth] - optional auth fill callback
@param {AuthFailureCallback} [args.onAuthFailure] - optional auth rejected callback
@param {AuthSuccessCallback} [args.onAuthSuccess] - optional auth approved callback
@param {PrePushCallback} [args.onPrePush] - optional pre-push hook callback
@param {string} [args.dir] - The [working tree](dir-vs-gitdir.md) directory path
@param {string} [args.gitdir=join(dir,'.git')] - [required] The [git directory](dir-vs-gitdir.md) path
@param {string} [args.ref] - Which branch or tag to push. By default this is the currently checked out branch.
@param {string} [args.url] - The URL of the remote repository. The default is the value set in the git config for that remote.
@param {string} [args.remote] - If URL is not specified, determines which remote to use.
@param {string} [args.remoteRef] - The name of the receiving branch on the remote. By default this is the configured remote tracking branch.
@param {boolean} [args.force = false] - If true, behaves the same as `git push --force`
@param {boolean} [args.delete = false] - If true, delete the remote ref
@param {string} [args.corsProxy] - Optional [CORS proxy](https://www.npmjs.com/%40isomorphic-git/cors-proxy). Overrides value in repo config.
@param {Object<string, string>} [args.headers] - Additional headers to include in HTTP requests, similar to git's `extraHeader` config
@param {object} [args.cache] - a [cache](cache.md) object

@returns {Promise<PushResult>} Resolves successfully when push completes with a detailed description of the operation from the server.
@see PushResult
@see RefUpdateStatus

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