git.push(options)

Pushes commits to remote.

push after commit
import { git } from '@codemod.com/workflow'

// clone
const repository = await git.clone('git@github.com:codemod-com/codemod.git')
// make changes
await repository
    .files()
    .jsFam()
    .astGrep('console.log($$$A)')
    .replace('console.error($$$A)')
// commit and push
await repository
    .commit('Changed console.log to console.error')
    .push({ force: true })

Parameters

options
PushOptions
interface PushOptions {
  /**
   * Enables force push
   * @default false
   */
  force?: boolean
}