git-annex-lock(1)

git-annex-lock1

Lock files to prevent modification

Usage

git annex lock [path ...]

Overview

Lock the specified annexed files, to prevent them from being modified. When no files are specified, all annexed files in the current directory are locked.

Locking a file changes how it is stored in the git repository (from a pointer file to a symlink), so this command will make a change that you can commit.

Options

file matching options

The git-annex-matching-options(1) can be used to specify files to lock.

--json

Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object.

--json-error-messages

Messages that would normally be output to standard error are included in the JSON instead.

Also the git-annex-common-options(1) can be used.

Releases

6 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13–Arch

--json since Debian 10 (Buster); --json-error-messages since Debian 10 (Buster).

Author

Joey Hess <[email protected]>

From git-annex 10.20261026-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.