コンテンツにスキップ

GlobalLfsOperations

このコンテンツはまだ日本語訳がありません。

Defined in: src/core/git.ts:211

Global LFS operations

Wraps: git lfs subcommands for user-level configuration

Operates on ~/.gitconfig (user-level) or /etc/gitconfig (system-level). For repository-level LFS operations, use repo.lfs instead.

Methods

install()

install(opts?): Promise<void>

Defined in: src/core/git.ts:232

Install Git LFS hooks globally

Wraps: git lfs install

Sets up the clean and smudge filters under the name “lfs” in the global Git config (~/.gitconfig) or system config (/etc/gitconfig).

Parameters

opts?

GlobalLfsInstallOpts & ExecOpts

Returns

Promise<void>

Example

// Install globally (to ~/.gitconfig)
await git.lfs.install();
// Install system-wide (to /etc/gitconfig)
await git.lfs.install({ system: true });
// Install with skip-smudge (manual LFS pull required)
await git.lfs.install({ skipSmudge: true });

uninstall()

uninstall(opts?): Promise<void>

Defined in: src/core/git.ts:250

Uninstall Git LFS hooks globally

Wraps: git lfs uninstall

Removes the clean and smudge filters from global or system config.

Parameters

opts?

GlobalLfsUninstallOpts & ExecOpts

Returns

Promise<void>

Example

// Uninstall from global config
await git.lfs.uninstall();
// Uninstall from system config
await git.lfs.uninstall({ system: true });

version()

version(opts?): Promise<string>

Defined in: src/core/git.ts:259

Get Git LFS version

Wraps: git lfs version

Parameters

opts?

ExecOpts

Returns

Promise<string>

LFS version string (e.g., “git-lfs/3.4.0”)