LinuxCommandLibrary

git-lock

Advisory file locking

TLDR

Lock a file

$ git lock [file.psd]
copy
Lock multiple files
$ git lock [file1.psd] [file2.psd]
copy

SYNOPSIS

git lock files

DESCRIPTION

git lock marks files as locked in git-extras. It adds files to a `.gitlock` file, indicating they shouldn't be modified by others. This provides advisory file locking for coordinating work on binary or non-mergeable files.
The lock is advisory and tracked in the repository, requiring team cooperation to respect locks. Use `git locked` to see currently locked files and `git unlock` to release them.

PARAMETERS

FILES

Files to lock.
--help
Display help information.

CAVEATS

Part of git-extras package. Advisory only, not enforced. See git lfs lock for LFS locking.

HISTORY

git lock is part of git-extras, providing simple advisory locking. For enforced locking, see Git LFS lock which provides server-side enforcement.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community