← All procedures

git.commit

Create commit

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

From the command line

$ mark git commit --message <string>

As data, in a program

{ "$proc": ["git", "commit"], "input": { "message": "<message>" } }

Input

FieldTypeRequiredDefaultDescription
messagestringyesCommit message
allbooleannofalseAutomatically stage modified files (default: false)
amendbooleannofalseAmend the last commit (default: false)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
hashstringyesThe hash of the new commit
messagestringyesThe commit message
authorstringyesThe author
datestringyesThe date of the commit
skippedbooleannoTrue when there was nothing to commit
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "description": "Commit message"
      },
      "all": {
        "default": false,
        "description": "Automatically stage modified files (default: false)",
        "type": "boolean"
      },
      "amend": {
        "default": false,
        "description": "Amend the last commit (default: false)",
        "type": "boolean"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      }
    },
    "required": [
      "message"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "hash": {
        "type": "string",
        "description": "The hash of the new commit"
      },
      "message": {
        "type": "string",
        "description": "The commit message"
      },
      "author": {
        "type": "string",
        "description": "The author"
      },
      "date": {
        "type": "string",
        "description": "The date of the commit"
      },
      "skipped": {
        "description": "True when there was nothing to commit",
        "type": "boolean"
      }
    },
    "required": [
      "hash",
      "message",
      "author",
      "date"
    ],
    "additionalProperties": {}
  }
}