← All procedures

git.pull

Pull from remote

CLI
Package
@procedures/git · README
Path
["git","pull"]
CLI
mark git pull
As data
{"$proc":["git","pull"],"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","pull"], {});
console.log(JSON.stringify(result));

From the command line

$ mark git pull

As data, in a program

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

Input

FieldTypeRequiredDefaultDescription
remotestringno"origin"Remote name (default: origin)
branchstringnoBranch to pull (default: current branch)
rebasebooleannofalseRebase instead of merge (default: false)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
remotestringyesThe remote
branchstringyesThe branch
commitsnumberyesThe number of commits that the pull brought
fastForwardbooleanyesTrue for a fast-forward
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "remote": {
        "default": "origin",
        "description": "Remote name (default: origin)",
        "type": "string"
      },
      "branch": {
        "description": "Branch to pull (default: current branch)",
        "type": "string"
      },
      "rebase": {
        "default": false,
        "description": "Rebase instead of merge (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 pull brought"
      },
      "fastForward": {
        "type": "boolean",
        "description": "True for a fast-forward"
      }
    },
    "required": [
      "remote",
      "branch",
      "commits",
      "fastForward"
    ],
    "additionalProperties": {}
  }
}