Skip to main content

@spawn/git@0.0.1
Built and signed on GitHub Actions

The git module provides a simple way to execute git commands.

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
3 months ago (0.0.1)
function git
git(
args?: CommandArgs,
options?: CommandOptions,
): GitCommand

Invokes the git cli.

Examples

Example 1

import { git } from "@spawn/common/git"

const result = await git("status");
console.log(result.code);
console.log(result.text());

Parameters

optional
args: CommandArgs
  • The command arguments.
optional
options: CommandOptions
  • The command options.

Return Type

A new instance of the GitCommand class.

Add Package

deno add jsr:@spawn/git

Import symbol

import { git } from "@spawn/git/command";

---- OR ----

Import directly with a jsr specifier

import { git } from "jsr:@spawn/git/command";

Add Package

npx jsr add @spawn/git

Import symbol

import { git } from "@spawn/git/command";

Add Package

yarn dlx jsr add @spawn/git

Import symbol

import { git } from "@spawn/git/command";

Add Package

pnpm dlx jsr add @spawn/git

Import symbol

import { git } from "@spawn/git/command";

Add Package

bunx jsr add @spawn/git

Import symbol

import { git } from "@spawn/git/command";