← All procedures

git.push

Push to remote

CLI
Package
@procedures/git · README
Path
["git","push"]
CLI
mark git push
As data
{"$proc":["git","push"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/git"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["git","push"], {});
console.log(JSON.stringify(result));

From the command line

$ mark git push

As data, in a program

{ "$proc": ["git", "push"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
remotestringno"origin"Remote name (default: origin)
branchstringnoBranch to push (default: current branch)
forcebooleannofalseForce push (default: false)
setUpstreambooleannofalseSet upstream tracking (default: false)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
remotestringyesThe remote
branchstringyesThe branch
commitsnumberyesThe number of commits that the push sent
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "remote": {
        "default": "origin",
        "description": "Remote name (default: origin)",
        "type": "string"
      },
      "branch": {
        "description": "Branch to push (default: current branch)",
        "type": "string"
      },
      "force": {
        "default": false,
        "description": "Force push (default: false)",
        "type": "boolean"
      },
      "setUpstream": {
        "default": false,
        "description": "Set upstream tracking (default: false)",
        "type": "boolean"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "remote": {
        "type": "string",
        "description": "The remote"
      },
      "branch": {
        "type": "string",
        "description": "The branch"
      },
      "commits": {
        "type": "number",
        "description": "The number of commits that the push sent"
      }
    },
    "required": [
      "remote",
      "branch",
      "commits"
    ],
    "additionalProperties": {}
  }
}