← All procedures

git.fetch

Fetch from remote

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

From the command line

$ mark git fetch

As data, in a program

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

Input

FieldTypeRequiredDefaultDescription
remotestringno"origin"Remote name (default: origin)
branchstringnoSpecific branch to fetch (default: all)
allbooleannofalseFetch all remotes (default: false)
prunebooleannofalsePrune deleted branches (default: false)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
remotestringyesThe remote
fetchedbooleanyesTrue when the fetch ran
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "remote": {
        "default": "origin",
        "description": "Remote name (default: origin)",
        "type": "string"
      },
      "branch": {
        "description": "Specific branch to fetch (default: all)",
        "type": "string"
      },
      "all": {
        "default": false,
        "description": "Fetch all remotes (default: false)",
        "type": "boolean"
      },
      "prune": {
        "default": false,
        "description": "Prune deleted branches (default: false)",
        "type": "boolean"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "remote": {
        "type": "string",
        "description": "The remote"
      },
      "fetched": {
        "type": "boolean",
        "description": "True when the fetch ran"
      }
    },
    "required": [
      "remote",
      "fetched"
    ],
    "additionalProperties": {}
  }
}